From b02a42d9b2385f25b763c8e608d3d167dd98301e Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 25 Nov 2025 08:56:50 +0100 Subject: [PATCH 01/56] Update dependencies --- gradle/libs.versions.toml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7a51c63b0d..439d7310e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,33 +1,33 @@ [versions] -kotlin = "2.2.20" -agp = "8.11.1" +kotlin = "2.2.21" +agp = "8.13.1" desugar_jdk_libs = "2.1.5" gradle-maven-publish-plugin = "0.32.0" -androidx-activity = "1.11.0" +androidx-activity = "1.12.0" androidx-annotation = "1.9.1" androidx-appcompat = "1.7.1" androidx-browser = "1.9.0" androidx-cardview = "1.0.0" -androidx-compose-animation = "1.9.2" -androidx-compose-foundation = "1.9.2" -androidx-compose-material = "1.9.2" +androidx-compose-animation = "1.9.5" +androidx-compose-foundation = "1.9.5" +androidx-compose-material = "1.9.5" androidx-compose-material-icons = "1.7.8" androidx-compose-material3 = "1.4.0" -androidx-compose-runtime = "1.9.2" -androidx-compose-ui = "1.9.2" +androidx-compose-runtime = "1.9.5" +androidx-compose-ui = "1.9.5" androidx-constraintlayout = "2.2.1" androidx-core = "1.17.0" -androidx-datastore = "1.1.7" +androidx-datastore = "1.2.0" androidx-fragment-ktx = "1.8.9" androidx-legacy = "1.0.0" -androidx-lifecycle = "2.9.4" +androidx-lifecycle = "2.10.0" androidx-media3 = "1.8.0" -androidx-navigation = "2.9.5" +androidx-navigation = "2.9.6" androidx-paging = "3.3.6" androidx-recyclerview = "1.4.0" -androidx-room = "2.8.1" +androidx-room = "2.8.4" androidx-viewpager2 = "1.1.0" androidx-webkit = "1.14.0" @@ -46,7 +46,7 @@ junit = "4.13.2" kotlinx-coroutines = "1.10.2" kotlinx-coroutines-test = "1.10.2" kotlinx-datetime = "0.7.1" -kotlinx-serialization-json = "1.8.1" +kotlinx-serialization-json = "1.9.0" kotlinx-collections-immutable = "0.4.0" From 9cf272152bee8e670168e306e39f56860b088cd9 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 25 Nov 2025 09:48:26 +0100 Subject: [PATCH 02/56] Introduce HtmlId and cosmetic changes --- .../readium/navigator/common/LocationElements.kt | 9 +++++++++ .../web/fixedlayout/FixedWebRenditionFactory.kt | 5 +++++ .../internals/webview/WebViewScrollController.kt | 10 +++++----- .../web/reflowable/ReflowableWebLocations.kt | 3 ++- .../web/reflowable/ReflowableWebRenditionFactory.kt | 5 +++++ .../web/reflowable/ReflowableWebRenditionState.kt | 7 ++++--- .../web/reflowable/resource/ReflowableResource.kt | 13 +++++-------- 7 files changed, 35 insertions(+), 17 deletions(-) diff --git a/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt b/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt index 7164bcea2c..3c2ae8d09a 100644 --- a/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt +++ b/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt @@ -8,6 +8,15 @@ package org.readium.navigator.common import org.readium.r2.shared.ExperimentalReadiumApi +/** + * An HTML Id. + */ +@ExperimentalReadiumApi +@JvmInline +public value class HtmlId( + public val value: String, +) + /** * A CSS selector. */ diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionFactory.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionFactory.kt index 3ecfffc2c3..30e45697b0 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionFactory.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionFactory.kt @@ -24,6 +24,7 @@ import org.readium.r2.shared.publication.epub.EpubLayout import org.readium.r2.shared.publication.presentation.page import org.readium.r2.shared.publication.presentation.presentation import org.readium.r2.shared.publication.services.isProtected +import org.readium.r2.shared.publication.services.isRestricted import org.readium.r2.shared.util.ThrowableError import org.readium.r2.shared.util.Try import org.readium.r2.shared.util.getOrElse @@ -59,6 +60,10 @@ public class FixedWebRenditionFactory private constructor( return null } + if (publication.isRestricted) { + return null + } + return FixedWebRenditionFactory( application, publication, diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index 2c23ee3d2a..7486347975 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -32,16 +32,16 @@ public class WebViewScrollController( get() = webView.maxScrollY public val canMoveLeft: Boolean - get() = webView.scrollX > webView.width / 2 == true + get() = webView.scrollX > webView.width / 2 public val canMoveRight: Boolean - get() = webView.maxScrollX - webView.scrollX > webView.width / 2 == true + get() = webView.maxScrollX - webView.scrollX > webView.width / 2 public val canMoveTop: Boolean - get() = webView.scrollY > webView.width / 2 == true + get() = webView.scrollY > webView.width / 2 public val canMoveBottom: Boolean - get() = webView.maxScrollY - webView.scrollY > webView.width / 2 == true + get() = webView.maxScrollY - webView.scrollY > webView.width / 2 public fun moveLeft() { webView.scrollBy(-webView.width, 0) @@ -169,7 +169,7 @@ private fun RelaxedWebView.scrollToProgression( ) { when (orientation) { Orientation.Vertical -> { - scrollTo(scrollX, progression.roundToInt() * maxScrollY.toInt()) + scrollTo(scrollX, progression.roundToInt() * maxScrollY) } Orientation.Horizontal -> when (direction) { LayoutDirection.Ltr -> { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt index 4afbd2c6cb..f087adba1a 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt @@ -14,6 +14,7 @@ import org.readium.navigator.common.Decoration import org.readium.navigator.common.DecorationLocation import org.readium.navigator.common.ExportableLocation import org.readium.navigator.common.GoLocation +import org.readium.navigator.common.HtmlId import org.readium.navigator.common.Location import org.readium.navigator.common.Progression import org.readium.navigator.common.ProgressionLocation @@ -34,7 +35,7 @@ import org.readium.r2.shared.util.mediatype.MediaType public data class ReflowableWebGoLocation( override val href: Url, val progression: Progression? = null, - // val cssSelector: String? = null, + val htmlId: HtmlId? = null, // val textBefore: String? = null, // val textAfter: String? = null, // val position: Int? = null diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt index 92ddee32b5..6244f1b327 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt @@ -18,6 +18,7 @@ import org.readium.r2.shared.publication.Publication import org.readium.r2.shared.publication.epub.EpubLayout import org.readium.r2.shared.publication.presentation.presentation import org.readium.r2.shared.publication.services.isProtected +import org.readium.r2.shared.publication.services.isRestricted import org.readium.r2.shared.util.Try /** @@ -51,6 +52,10 @@ public class ReflowableWebRenditionFactory private constructor( return null } + if (publication.isRestricted) { + return null + } + return ReflowableWebRenditionFactory( application, publication, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index f008bb4a08..89b22799a4 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -27,6 +27,7 @@ import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentMapOf import org.readium.navigator.common.DecorationController +import org.readium.navigator.common.HtmlId import org.readium.navigator.common.NavigationController import org.readium.navigator.common.Overflow import org.readium.navigator.common.OverflowController @@ -299,8 +300,8 @@ internal class ReflowableNavigationDelegate( override suspend fun goTo(url: Url) { val location = ReflowableWebGoLocation( - href = url.removeFragment() - // TODO: use fragment + href = url.removeFragment(), + htmlId = url.fragment?.let { HtmlId(it) } ) goTo(location) } @@ -395,7 +396,7 @@ internal class ReflowableDecorationDelegate( ) : DecorationController { override var decorations: PersistentMap> by - mutableStateOf(persistentMapOf>()) + mutableStateOf(persistentMapOf()) } internal class ReflowableSelectionDelegate( diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index cdc9a4f3c8..0413bcf726 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -210,7 +210,7 @@ internal fun ReflowableResource( val decoration = decorations.value[group]?.firstOrNull { it.id.value == id } ?: return@DelegatingGesturesListener - val event = DecorationListener.OnActivatedEvent( + val event = DecorationListener.OnActivatedEvent( decoration = decoration, group = group, rect = rect.shift(paddingShift), @@ -302,13 +302,10 @@ internal fun ReflowableResource( webview.setLayerType(View.LAYER_TYPE_HARDWARE, null) // Prevents vertical scrolling towards blank space. // See https://github.com/readium/readium-css/issues/158 - webview.setOnTouchListener(object : View.OnTouchListener { - @SuppressLint("ClickableViewAccessibility") - override fun onTouch(view: View, event: MotionEvent): Boolean { - return orientationRef == Orientation.Horizontal && - event.action == MotionEvent.ACTION_MOVE - } - }) + webview.setOnTouchListener { view, event -> + orientationRef == Orientation.Horizontal && + event.action == MotionEvent.ACTION_MOVE + } }, onDispose = { resourceState.scrollController.value = null From 9546527db07cc9bfeb1c77a480db94c56c149e04 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 26 Nov 2025 15:48:21 +0100 Subject: [PATCH 03/56] Downgrade kotlinx-serialization --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 439d7310e7..271776b3aa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,7 +46,7 @@ junit = "4.13.2" kotlinx-coroutines = "1.10.2" kotlinx-coroutines-test = "1.10.2" kotlinx-datetime = "0.7.1" -kotlinx-serialization-json = "1.9.0" +kotlinx-serialization-json = "1.8.1" kotlinx-collections-immutable = "0.4.0" From c6be690131863f6d4da89aff3817ccc73b452175 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 26 Nov 2025 17:44:43 +0100 Subject: [PATCH 04/56] Fix go to URL with fragment --- node_modules/.bin/corepack | 1 + node_modules/.bin/pnpm | 1 + node_modules/.bin/pnpx | 1 + node_modules/.bin/yarn | 1 + node_modules/.bin/yarnpkg | 1 + node_modules/.package-lock.json | 23 + node_modules/corepack/CHANGELOG.md | 582 + node_modules/corepack/LICENSE.md | 7 + node_modules/corepack/README.md | 381 + node_modules/corepack/dist/corepack.js | 4 + node_modules/corepack/dist/lib/corepack.cjs | 23713 ++++++++++++++++ node_modules/corepack/dist/npm.js | 4 + node_modules/corepack/dist/npx.js | 4 + node_modules/corepack/dist/pnpm.js | 4 + node_modules/corepack/dist/pnpx.js | 4 + node_modules/corepack/dist/yarn.js | 4 + node_modules/corepack/dist/yarnpkg.js | 4 + node_modules/corepack/package.json | 102 + node_modules/corepack/shims/corepack | 12 + node_modules/corepack/shims/corepack.cmd | 7 + node_modules/corepack/shims/corepack.ps1 | 28 + node_modules/corepack/shims/nodewin/corepack | 12 + .../corepack/shims/nodewin/corepack.cmd | 7 + .../corepack/shims/nodewin/corepack.ps1 | 28 + node_modules/corepack/shims/nodewin/npm | 12 + node_modules/corepack/shims/nodewin/npm.cmd | 7 + node_modules/corepack/shims/nodewin/npm.ps1 | 28 + node_modules/corepack/shims/nodewin/npx | 12 + node_modules/corepack/shims/nodewin/npx.cmd | 7 + node_modules/corepack/shims/nodewin/npx.ps1 | 28 + node_modules/corepack/shims/nodewin/pnpm | 12 + node_modules/corepack/shims/nodewin/pnpm.cmd | 7 + node_modules/corepack/shims/nodewin/pnpm.ps1 | 28 + node_modules/corepack/shims/nodewin/pnpx | 12 + node_modules/corepack/shims/nodewin/pnpx.cmd | 7 + node_modules/corepack/shims/nodewin/pnpx.ps1 | 28 + node_modules/corepack/shims/nodewin/yarn | 12 + node_modules/corepack/shims/nodewin/yarn.cmd | 7 + node_modules/corepack/shims/nodewin/yarn.ps1 | 28 + node_modules/corepack/shims/nodewin/yarnpkg | 12 + .../corepack/shims/nodewin/yarnpkg.cmd | 7 + .../corepack/shims/nodewin/yarnpkg.ps1 | 28 + node_modules/corepack/shims/npm | 12 + node_modules/corepack/shims/npm.cmd | 7 + node_modules/corepack/shims/npm.ps1 | 28 + node_modules/corepack/shims/npx | 12 + node_modules/corepack/shims/npx.cmd | 7 + node_modules/corepack/shims/npx.ps1 | 28 + node_modules/corepack/shims/pnpm | 12 + node_modules/corepack/shims/pnpm.cmd | 7 + node_modules/corepack/shims/pnpm.ps1 | 28 + node_modules/corepack/shims/pnpx | 12 + node_modules/corepack/shims/pnpx.cmd | 7 + node_modules/corepack/shims/pnpx.ps1 | 28 + node_modules/corepack/shims/yarn | 12 + node_modules/corepack/shims/yarn.cmd | 7 + node_modules/corepack/shims/yarn.ps1 | 28 + node_modules/corepack/shims/yarnpkg | 12 + node_modules/corepack/shims/yarnpkg.cmd | 7 + node_modules/corepack/shims/yarnpkg.ps1 | 28 + package-lock.json | 28 + package.json | 5 + .../reflowable-initialization-bridge.ts | 5 + .../src/bridge/reflowable-move-bridge.ts | 43 + .../src/index-reflowable-injectable.ts | 2 + .../generated/reflowable-injectable-script.js | 2 +- .../reflowable-injectable-script.js.map | 2 +- .../internals/webapi/ReflowableApiState.kt | 14 + .../web/internals/webapi/ReflowableMoveApi.kt | 54 + .../webview/WebViewScrollController.kt | 50 +- .../web/reflowable/ReflowableWebRendition.kt | 10 +- .../reflowable/ReflowableWebRenditionState.kt | 59 +- .../reflowable/resource/ReflowableResource.kt | 36 + .../resource/ReflowableResourceState.kt | 3 +- 74 files changed, 25786 insertions(+), 26 deletions(-) create mode 120000 node_modules/.bin/corepack create mode 120000 node_modules/.bin/pnpm create mode 120000 node_modules/.bin/pnpx create mode 120000 node_modules/.bin/yarn create mode 120000 node_modules/.bin/yarnpkg create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/corepack/CHANGELOG.md create mode 100644 node_modules/corepack/LICENSE.md create mode 100644 node_modules/corepack/README.md create mode 100755 node_modules/corepack/dist/corepack.js create mode 100644 node_modules/corepack/dist/lib/corepack.cjs create mode 100755 node_modules/corepack/dist/npm.js create mode 100755 node_modules/corepack/dist/npx.js create mode 100755 node_modules/corepack/dist/pnpm.js create mode 100755 node_modules/corepack/dist/pnpx.js create mode 100755 node_modules/corepack/dist/yarn.js create mode 100755 node_modules/corepack/dist/yarnpkg.js create mode 100644 node_modules/corepack/package.json create mode 100644 node_modules/corepack/shims/corepack create mode 100644 node_modules/corepack/shims/corepack.cmd create mode 100644 node_modules/corepack/shims/corepack.ps1 create mode 100644 node_modules/corepack/shims/nodewin/corepack create mode 100644 node_modules/corepack/shims/nodewin/corepack.cmd create mode 100644 node_modules/corepack/shims/nodewin/corepack.ps1 create mode 100644 node_modules/corepack/shims/nodewin/npm create mode 100644 node_modules/corepack/shims/nodewin/npm.cmd create mode 100644 node_modules/corepack/shims/nodewin/npm.ps1 create mode 100644 node_modules/corepack/shims/nodewin/npx create mode 100644 node_modules/corepack/shims/nodewin/npx.cmd create mode 100644 node_modules/corepack/shims/nodewin/npx.ps1 create mode 100644 node_modules/corepack/shims/nodewin/pnpm create mode 100644 node_modules/corepack/shims/nodewin/pnpm.cmd create mode 100644 node_modules/corepack/shims/nodewin/pnpm.ps1 create mode 100644 node_modules/corepack/shims/nodewin/pnpx create mode 100644 node_modules/corepack/shims/nodewin/pnpx.cmd create mode 100644 node_modules/corepack/shims/nodewin/pnpx.ps1 create mode 100644 node_modules/corepack/shims/nodewin/yarn create mode 100644 node_modules/corepack/shims/nodewin/yarn.cmd create mode 100644 node_modules/corepack/shims/nodewin/yarn.ps1 create mode 100644 node_modules/corepack/shims/nodewin/yarnpkg create mode 100644 node_modules/corepack/shims/nodewin/yarnpkg.cmd create mode 100644 node_modules/corepack/shims/nodewin/yarnpkg.ps1 create mode 100755 node_modules/corepack/shims/npm create mode 100644 node_modules/corepack/shims/npm.cmd create mode 100755 node_modules/corepack/shims/npm.ps1 create mode 100755 node_modules/corepack/shims/npx create mode 100644 node_modules/corepack/shims/npx.cmd create mode 100755 node_modules/corepack/shims/npx.ps1 create mode 100755 node_modules/corepack/shims/pnpm create mode 100644 node_modules/corepack/shims/pnpm.cmd create mode 100755 node_modules/corepack/shims/pnpm.ps1 create mode 100755 node_modules/corepack/shims/pnpx create mode 100644 node_modules/corepack/shims/pnpx.cmd create mode 100755 node_modules/corepack/shims/pnpx.ps1 create mode 100755 node_modules/corepack/shims/yarn create mode 100644 node_modules/corepack/shims/yarn.cmd create mode 100755 node_modules/corepack/shims/yarn.ps1 create mode 100755 node_modules/corepack/shims/yarnpkg create mode 100644 node_modules/corepack/shims/yarnpkg.cmd create mode 100755 node_modules/corepack/shims/yarnpkg.ps1 create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts create mode 100644 readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt diff --git a/node_modules/.bin/corepack b/node_modules/.bin/corepack new file mode 120000 index 0000000000..e29d408564 --- /dev/null +++ b/node_modules/.bin/corepack @@ -0,0 +1 @@ +../corepack/dist/corepack.js \ No newline at end of file diff --git a/node_modules/.bin/pnpm b/node_modules/.bin/pnpm new file mode 120000 index 0000000000..7df34b77e0 --- /dev/null +++ b/node_modules/.bin/pnpm @@ -0,0 +1 @@ +../corepack/dist/pnpm.js \ No newline at end of file diff --git a/node_modules/.bin/pnpx b/node_modules/.bin/pnpx new file mode 120000 index 0000000000..512398f2c0 --- /dev/null +++ b/node_modules/.bin/pnpx @@ -0,0 +1 @@ +../corepack/dist/pnpx.js \ No newline at end of file diff --git a/node_modules/.bin/yarn b/node_modules/.bin/yarn new file mode 120000 index 0000000000..ce0948b397 --- /dev/null +++ b/node_modules/.bin/yarn @@ -0,0 +1 @@ +../corepack/dist/yarn.js \ No newline at end of file diff --git a/node_modules/.bin/yarnpkg b/node_modules/.bin/yarnpkg new file mode 120000 index 0000000000..4b845ffbf5 --- /dev/null +++ b/node_modules/.bin/yarnpkg @@ -0,0 +1 @@ +../corepack/dist/yarnpkg.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000000..a8243db4c1 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,23 @@ +{ + "name": "kotlin-toolkit", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/corepack": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/corepack/-/corepack-0.34.5.tgz", + "integrity": "sha512-G+ui7ZUxTzgwRc45pi7OhOybKFnGpxVDp0khf+eFdw/gcQmZfme4nUh4Z4URY9YPoaZYP86zNZmqV/T2Bf5/rA==", + "license": "MIT", + "bin": { + "corepack": "dist/corepack.js", + "pnpm": "dist/pnpm.js", + "pnpx": "dist/pnpx.js", + "yarn": "dist/yarn.js", + "yarnpkg": "dist/yarnpkg.js" + }, + "engines": { + "node": "^20.10.0 || ^22.11.0 || >=24.0.0" + } + } + } +} diff --git a/node_modules/corepack/CHANGELOG.md b/node_modules/corepack/CHANGELOG.md new file mode 100644 index 0000000000..63afb3ebaf --- /dev/null +++ b/node_modules/corepack/CHANGELOG.md @@ -0,0 +1,582 @@ +# Changelog + +## [0.34.5](https://github.com/nodejs/corepack/compare/v0.34.4...v0.34.5) (2025-11-24) + + +### Bug Fixes + +* **pnpm:** fix bin path for v11 ([#776](https://github.com/nodejs/corepack/issues/776)) ([0c8048a](https://github.com/nodejs/corepack/commit/0c8048adc61651f6eb798448675d3ecc4a7e26a9)) +* update package manager versions ([#773](https://github.com/nodejs/corepack/issues/773)) ([06c286b](https://github.com/nodejs/corepack/commit/06c286b5fc171e43090b5eed5cd501bc9580927f)) + +## [0.34.4](https://github.com/nodejs/corepack/compare/v0.34.3...v0.34.4) (2025-11-14) + + +### Bug Fixes + +* bump pnpm version in `config.json` ([#768](https://github.com/nodejs/corepack/issues/768)) ([99a9a6e](https://github.com/nodejs/corepack/commit/99a9a6eb1b6e918ceb896b3d558bb5ed583bdc70)) +* ignore devEngines version range when CLI provides a version ([#762](https://github.com/nodejs/corepack/issues/762)) ([ac518c4](https://github.com/nodejs/corepack/commit/ac518c4106f8d9ceb4e85e6c3614b1eba5d03fcb)) +* use `lstatSync` in `generatePosixLink` ([#767](https://github.com/nodejs/corepack/issues/767)) ([a02bea0](https://github.com/nodejs/corepack/commit/a02bea078eb584ed7492ec561626987e35386bae)) + +## [0.34.3](https://github.com/nodejs/corepack/compare/v0.34.2...v0.34.3) (2025-11-07) + + +### Bug Fixes + +* update package manager versions ([#765](https://github.com/nodejs/corepack/issues/765)) ([13a2e98](https://github.com/nodejs/corepack/commit/13a2e989ee37694a7ec1b1d60acdaa28f90642d1)) +* Yarn switch install support and tests ([#761](https://github.com/nodejs/corepack/issues/761)) ([d04d483](https://github.com/nodejs/corepack/commit/d04d4839aeecaf4fca989c577f6c000dc90be933)) + +## [0.34.2](https://github.com/nodejs/corepack/compare/v0.34.1...v0.34.2) (2025-10-31) + + +### Bug Fixes + +* bump package manager versions ([#754](https://github.com/nodejs/corepack/issues/754)) ([35e3869](https://github.com/nodejs/corepack/commit/35e3869f3f4d21bbfccdf78ea564ab0723d6f36f)) +* fix potential race condition in `node-tar` ([#757](https://github.com/nodejs/corepack/pull/757)) ([78808a7](78808a72691655fe5140c02ae41d4baef88cd9fa)) + +## [0.34.1](https://github.com/nodejs/corepack/compare/v0.34.0...v0.34.1) (2025-10-17) + + +### Bug Fixes + +* incorrect registry origin check ([#743](https://github.com/nodejs/corepack/issues/743)) ([cc840b2](https://github.com/nodejs/corepack/commit/cc840b2d232a29c225d2436d350640f0035ed28b)) +* update package manager versions ([#728](https://github.com/nodejs/corepack/issues/728)) ([78ce029](https://github.com/nodejs/corepack/commit/78ce0297a9152bb5c68f724821a9a0095b408334)) + +## [0.34.0](https://github.com/nodejs/corepack/compare/v0.33.0...v0.34.0) (2025-07-19) + + +### ⚠ BREAKING CHANGES + +* drop Node.js 18.x and 23.x support + +### Features + +* update package manager versions ([#719](https://github.com/nodejs/corepack/issues/719)) ([7707ea7](https://github.com/nodejs/corepack/commit/7707ea7350c129ad3aae8ca08e9e80fcf164dcb6)) + + +### Miscellaneous Chores + +* remove Node.js 18.x and 23.x usage, add 24.x ([#718](https://github.com/nodejs/corepack/issues/718)) ([783a42f](https://github.com/nodejs/corepack/commit/783a42fbe35371964e9dde75e2263b179f53bc0c)) + +## [0.33.0](https://github.com/nodejs/corepack/compare/v0.32.0...v0.33.0) (2025-06-02) + + +### Features + +* Adds guard to avoid stepping on Yarn's feet ([#714](https://github.com/nodejs/corepack/issues/714)) ([5fc3691](https://github.com/nodejs/corepack/commit/5fc3691354eb5bdeca17a9495b234584353f0151)) +* update package manager versions ([#671](https://github.com/nodejs/corepack/issues/671)) ([b45b3a3](https://github.com/nodejs/corepack/commit/b45b3a3244bacfbaf65188ae8c04209a1e98307d)) + + +### Bug Fixes + +* debug text typo ([#698](https://github.com/nodejs/corepack/issues/698)) ([0b94797](https://github.com/nodejs/corepack/commit/0b94797f96e30e46e466873fe7d437d0471cd92c)) + +## [0.32.0](https://github.com/nodejs/corepack/compare/v0.31.0...v0.32.0) (2025-02-28) + + +### Features + +* add limited support for `devEngines` ([#643](https://github.com/nodejs/corepack/issues/643)) ([b456268](https://github.com/nodejs/corepack/commit/b4562688513f23e37e37b0d69a0daff33ca84c8d)) +* add more informative error when fetching latest stable fails ([#644](https://github.com/nodejs/corepack/issues/644)) ([53b1fe7](https://github.com/nodejs/corepack/commit/53b1fe75c47c06bd72a8b8f8bb699a47c9ca32fb)) +* add support for `.corepack.env` ([#642](https://github.com/nodejs/corepack/issues/642)) ([9b95b46](https://github.com/nodejs/corepack/commit/9b95b46f05e50fe1c60f05309c210ba8fe4e23c5)) +* update package manager versions ([#617](https://github.com/nodejs/corepack/issues/617)) ([b83bb5e](https://github.com/nodejs/corepack/commit/b83bb5ec150980c998b9c7053dff307d912cb508)) + + +### Bug Fixes + +* do not resolve fallback descriptor when `packageManager` is defined ([#632](https://github.com/nodejs/corepack/issues/632)) ([12e77e5](https://github.com/nodejs/corepack/commit/12e77e506946d42a0de9ce8e68d75af8454d6776)) +* **doc:** fix link to proxy library ([#636](https://github.com/nodejs/corepack/issues/636)) ([bae0839](https://github.com/nodejs/corepack/commit/bae08397943d4b99437389b4286546361091f4b3)) +* replace explicit with specify as verb ([#665](https://github.com/nodejs/corepack/issues/665)) ([351d86c](https://github.com/nodejs/corepack/commit/351d86c20226a8c18bfe212be27401f2908b1595)) +* **use:** do not throw on invalid `packageManager` ([#663](https://github.com/nodejs/corepack/issues/663)) ([4be72f6](https://github.com/nodejs/corepack/commit/4be72f6941afa0c9b2b7d26635016bb7b560df8a)) + +## [0.31.0](https://github.com/nodejs/corepack/compare/v0.30.0...v0.31.0) (2025-01-27) + + +### ⚠ BREAKING CHANGES + +* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) + +### Features + +* update package manager versions ([#595](https://github.com/nodejs/corepack/issues/595)) ([c7a9bde](https://github.com/nodejs/corepack/commit/c7a9bde16dcbbb7e6ef03fef740656cde7ade360)) + + +### Bug Fixes + +* only print message for `UsageError`s ([#602](https://github.com/nodejs/corepack/issues/602)) ([72a588c](https://github.com/nodejs/corepack/commit/72a588c2370c17e415b24fe389efdafb3c84e90b)) +* update npm registry keys ([#614](https://github.com/nodejs/corepack/issues/614)) ([8c90caa](https://github.com/nodejs/corepack/commit/8c90caab7f1c5c9b89f1de113bc1dfc441bf25d2)) + + +### Miscellaneous Chores + +* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) ([8bebc0c](https://github.com/nodejs/corepack/commit/8bebc0c0a5cbcdeec41673dcbaf581e6e1c1be11)) + +## [0.30.0](https://github.com/nodejs/corepack/compare/v0.29.4...v0.30.0) (2024-11-23) + + +### Features + +* update package manager versions ([#578](https://github.com/nodejs/corepack/issues/578)) ([a286c8f](https://github.com/nodejs/corepack/commit/a286c8f5537ea9ecf9b6ff53c7bc3e8da4e3c8bb)) + + +### Performance Improvements + +* prefer `module.enableCompileCache` over `v8-compile-cache` ([#574](https://github.com/nodejs/corepack/issues/574)) ([cba6905](https://github.com/nodejs/corepack/commit/cba690575bd606faeee54bd512ccb8797d49055f)) + +## [0.29.4](https://github.com/nodejs/corepack/compare/v0.29.3...v0.29.4) (2024-09-07) + + +### Features + +* update package manager versions ([#543](https://github.com/nodejs/corepack/issues/543)) ([b819e40](https://github.com/nodejs/corepack/commit/b819e404dbb23c4ae3d5dbe55e21de74d714ee9c)) + +## [0.29.3](https://github.com/nodejs/corepack/compare/v0.29.2...v0.29.3) (2024-07-21) + + +### Bug Fixes + +* fallback to `shasum` when `integrity` is not defined ([#542](https://github.com/nodejs/corepack/issues/542)) ([eb63873](https://github.com/nodejs/corepack/commit/eb63873c6c617a2f8ac7106e26ccfe8aa3ae1fb9)) +* make `DEBUG=corepack` more useful ([#538](https://github.com/nodejs/corepack/issues/538)) ([6019d7b](https://github.com/nodejs/corepack/commit/6019d7b56e85bd8b7b58a1a487922c707e70e30e)) + +## [0.29.2](https://github.com/nodejs/corepack/compare/v0.29.1...v0.29.2) (2024-07-13) + + +### Bug Fixes + +* trigger release after 0.29.1 failed to publish ([18e29ce](https://github.com/nodejs/corepack/commit/18e29ce3c465b64d48ccf3feef7cd1be94da70b0)) + +## [0.29.1](https://github.com/nodejs/corepack/compare/v0.29.0...v0.29.1) (2024-07-13) + + +### Bug Fixes + +* trigger release after 0.29.0 failed to publish ([e6ba066](https://github.com/nodejs/corepack/commit/e6ba06657b0985c112f288932ca39c0562129566)) + +## [0.29.0](https://github.com/nodejs/corepack/compare/v0.28.2...v0.29.0) (2024-07-12) + + +### Features + +* parallelize linking, unlinking and installing ([#524](https://github.com/nodejs/corepack/issues/524)) ([f0734e6](https://github.com/nodejs/corepack/commit/f0734e6e8023ff361dac179c0d8656740d550c27)) +* update package manager versions ([#492](https://github.com/nodejs/corepack/issues/492)) ([3e3b046](https://github.com/nodejs/corepack/commit/3e3b04619cb4a91f207a72fb450f6fc4e2f01aec)) + + +### Bug Fixes + +* replace npm registry domain in tarball URL ([#502](https://github.com/nodejs/corepack/issues/502)) ([db6fae5](https://github.com/nodejs/corepack/commit/db6fae50cf44884d1e9a6f7e99402e7e807ba3ca)) +* selectively import required semver functions ([#511](https://github.com/nodejs/corepack/issues/511)) ([e7ad533](https://github.com/nodejs/corepack/commit/e7ad533d43dc9495493f0d883c3cbbb94caa1d41)) + +## [0.28.2](https://github.com/nodejs/corepack/compare/v0.28.1...v0.28.2) (2024-05-31) + + +### Features + +* update package manager versions ([#481](https://github.com/nodejs/corepack/issues/481)) ([e1abb83](https://github.com/nodejs/corepack/commit/e1abb832416a793b490b2b51b4082fe822fc932c)) + +## [0.28.1](https://github.com/nodejs/corepack/compare/v0.28.0...v0.28.1) (2024-05-10) + + +### Features + +* add support for `COREPACK_INTEGRITY_KEYS=0` ([#470](https://github.com/nodejs/corepack/issues/470)) ([f15ebc2](https://github.com/nodejs/corepack/commit/f15ebc289ebcd6a86580f15ae3c4ef0e1be37c4b)) +* update package manager versions ([#469](https://github.com/nodejs/corepack/issues/469)) ([985895b](https://github.com/nodejs/corepack/commit/985895bccb5ec68b3645c540d8500c572e1ccadb)) + + +### Bug Fixes + +* COREPACK_NPM_REGISTRY should allow for username/password auth ([#466](https://github.com/nodejs/corepack/issues/466)) ([6efa349](https://github.com/nodejs/corepack/commit/6efa34988229918debe6e881d45ba6715282f283)) + +## [0.28.0](https://github.com/nodejs/corepack/compare/v0.27.0...v0.28.0) (2024-04-20) + + +### ⚠ BREAKING CHANGES + +* call `executePackageManagerRequest` directly ([#430](https://github.com/nodejs/corepack/issues/430)) + +### Bug Fixes + +* call `executePackageManagerRequest` directly ([#430](https://github.com/nodejs/corepack/issues/430)) ([0f9b748](https://github.com/nodejs/corepack/commit/0f9b74864048d5dc150a63cc582966af0c5f363f)) + +## [0.27.0](https://github.com/nodejs/corepack/compare/v0.26.0...v0.27.0) (2024-04-19) + + +### ⚠ BREAKING CHANGES + +* attempting to download a version from the npm registry (or a mirror) that was published using the now deprecated PGP signature without providing a hash will trigger an error. Users can disable the signature verification using a environment variable. + +### Features + +* separate read and write operations on lastKnownGood.json ([#446](https://github.com/nodejs/corepack/issues/446)) ([c449adc](https://github.com/nodejs/corepack/commit/c449adc81822a604ee8f00ae2b53fc411535f96d)) +* update package manager versions ([#425](https://github.com/nodejs/corepack/issues/425)) ([1423190](https://github.com/nodejs/corepack/commit/142319056424b1e0da2bdbe801c52c5910023707)) +* update package manager versions ([#462](https://github.com/nodejs/corepack/issues/462)) ([56816c2](https://github.com/nodejs/corepack/commit/56816c2b7ebc9926f07048b0ec4ff6025bb4e293)) +* verify integrity signature when downloading from npm registry ([#432](https://github.com/nodejs/corepack/issues/432)) ([e561dd0](https://github.com/nodejs/corepack/commit/e561dd00bbacc5bc15a492fc36574fa0e37bff7b)) + + +### Bug Fixes + +* add path to `package.json` in error message ([#456](https://github.com/nodejs/corepack/issues/456)) ([32a93ea](https://github.com/nodejs/corepack/commit/32a93ea4f51eb7db7dc95a16c5719695edf4b53e)) +* correctly set `Dispatcher` prototype for `ProxyAgent` ([#451](https://github.com/nodejs/corepack/issues/451)) ([73d9a1e](https://github.com/nodejs/corepack/commit/73d9a1e2d2f84906bf01952f1dca8adab576b7bf)) +* download fewer metadata from npm registry ([#436](https://github.com/nodejs/corepack/issues/436)) ([082fabf](https://github.com/nodejs/corepack/commit/082fabf8b15658e69e4fb62bb854fe9aace78b70)) +* hash check when downloading Yarn Berry from npm ([#439](https://github.com/nodejs/corepack/issues/439)) ([4672162](https://github.com/nodejs/corepack/commit/467216281e1719a739d0eeea370b335adfb37b8d)) +* Incorrect authorization prefix for basic auth, and undocumented env var ([#454](https://github.com/nodejs/corepack/issues/454)) ([2d63536](https://github.com/nodejs/corepack/commit/2d63536413971d43f570deb035845aa0bd5202f0)) +* re-add support for custom registries with auth ([#397](https://github.com/nodejs/corepack/issues/397)) ([d267753](https://github.com/nodejs/corepack/commit/d2677538cdb613fcab6d2a45bb07f349bdc65c2b)) + +## [0.26.0](https://github.com/nodejs/corepack/compare/v0.25.2...v0.26.0) (2024-03-08) + + +### Features + +* Pins the package manager as it's used for the first time ([#413](https://github.com/nodejs/corepack/issues/413)) ([8b6c6d4](https://github.com/nodejs/corepack/commit/8b6c6d4b2b7a9d61ae6c33c07e12354bd5afc2ba)) +* update package manager versions ([#415](https://github.com/nodejs/corepack/issues/415)) ([e8edba7](https://github.com/nodejs/corepack/commit/e8edba771bca6fb10c855c04eee8102ffa792d58)) + + +### Bug Fixes + +* group the download prompt together ([#391](https://github.com/nodejs/corepack/issues/391)) ([00506b2](https://github.com/nodejs/corepack/commit/00506b2a15dd87ec03240578077a35b7980e00c1)) +* ignore `EROFS` errors ([#421](https://github.com/nodejs/corepack/issues/421)) ([b7ec137](https://github.com/nodejs/corepack/commit/b7ec137210efd35c3461321b6434e3e13a87d42f)) +* improve support for `COREPACK_NPM_REGISTRY` with Yarn Berry ([#396](https://github.com/nodejs/corepack/issues/396)) ([47be27c](https://github.com/nodejs/corepack/commit/47be27c9db988e10f651d23b3f53bcf55318a894)) +* Windows malicious file analysis waiting problem ([#398](https://github.com/nodejs/corepack/issues/398)) ([295a1cd](https://github.com/nodejs/corepack/commit/295a1cdb9cbbbce8434e8d82b96eb63e57c46c1a)) + +## [0.25.2](https://github.com/nodejs/corepack/compare/v0.25.1...v0.25.2) (2024-02-21) + + +### Features + +* update package manager versions ([#362](https://github.com/nodejs/corepack/issues/362)) ([1423312](https://github.com/nodejs/corepack/commit/1423312a0eb7844dcdd43ae8a63cf12dcacedb2b)) + + +### Bug Fixes + +* do not hard fail if Corepack home folder cannot be created ([#382](https://github.com/nodejs/corepack/issues/382)) ([9834f57](https://github.com/nodejs/corepack/commit/9834f5790a99ce2c6c283321bb38b02e5561b7ca)) +* do not show download prompt when downloading JSON ([#383](https://github.com/nodejs/corepack/issues/383)) ([bc137a0](https://github.com/nodejs/corepack/commit/bc137a0073c3343ce2d552b6e13bfd2a48f08351)) + +## [0.25.1](https://github.com/nodejs/corepack/compare/v0.25.0...v0.25.1) (2024-02-20) + + +### Bug Fixes + +* use valid semver range for `engines.node` ([#378](https://github.com/nodejs/corepack/issues/378)) ([f2185fe](https://github.com/nodejs/corepack/commit/f2185fefa145cc75fca082acc169f8aaef637ca2)) + +## [0.25.0](https://github.com/nodejs/corepack/compare/v0.24.1...v0.25.0) (2024-02-20) + + +### ⚠ BREAKING CHANGES + +* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351)) +* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375)) +* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365)) +* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373)) +* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360)) + +### Features + +* add `corepack cache` command ([#363](https://github.com/nodejs/corepack/issues/363)) ([f442366](https://github.com/nodejs/corepack/commit/f442366c1c00d0c3f388b757c3797504f9a6b62e)) +* add support for URL in `"packageManager"` ([#359](https://github.com/nodejs/corepack/issues/359)) ([4a8ce6d](https://github.com/nodejs/corepack/commit/4a8ce6d42f081047a341f36067696346c9f3e1ea)) +* bump Known Good Release when downloading new version ([#364](https://github.com/nodejs/corepack/issues/364)) ([a56c13b](https://github.com/nodejs/corepack/commit/a56c13bd0b1c11e50361b8b4b6f8a53571e3981a)) +* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360)) ([6b8d87f](https://github.com/nodejs/corepack/commit/6b8d87f2374f79855b24d659f2a2579d6b39f54f)) +* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351)) ([d9c70b9](https://github.com/nodejs/corepack/commit/d9c70b91f698787d693406626a73dc95cb18bc1d)) +* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373)) ([54e9510](https://github.com/nodejs/corepack/commit/54e9510cdaf6ed08c9dea1ed3999fa65116cb4c7)) +* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365)) ([fe6a307](https://github.com/nodejs/corepack/commit/fe6a3072f64efa810b90e4ee52e0b3ff14c63184)) + + +### Bug Fixes + +* remove unsafe remove of install folder ([#372](https://github.com/nodejs/corepack/issues/372)) ([65880ca](https://github.com/nodejs/corepack/commit/65880cafed5f4195f8e7656ca9af4cbcbb7682d3)) + + +### Miscellaneous Chores + +* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375)) ([9a1cb38](https://github.com/nodejs/corepack/commit/9a1cb385bba9ade8e9fbf5517c2bdff60295f9ed)) + +## [0.24.1](https://github.com/nodejs/corepack/compare/v0.24.0...v0.24.1) (2024-01-13) + + +### Features + +* update package manager versions ([#348](https://github.com/nodejs/corepack/issues/348)) ([cc3ada7](https://github.com/nodejs/corepack/commit/cc3ada73bccd0a5b0ff16834e518efa521c9eea4)) + + +### Bug Fixes + +* **use:** create `package.json` when calling `corepack use` on empty dir ([#350](https://github.com/nodejs/corepack/issues/350)) ([2950a8a](https://github.com/nodejs/corepack/commit/2950a8a30b64b4598abc354e45400e83d56e541b)) + +## [0.24.0](https://github.com/nodejs/corepack/compare/v0.23.0...v0.24.0) (2023-12-29) + + +### Features + +* add support for HTTP redirect ([#341](https://github.com/nodejs/corepack/issues/341)) ([6df5063](https://github.com/nodejs/corepack/commit/6df5063b14868ff21499a051e5122fa7211be6ed)) +* add support for rangeless commands ([#338](https://github.com/nodejs/corepack/issues/338)) ([9bee415](https://github.com/nodejs/corepack/commit/9bee4150815113d97f0bd77d62c8d999cfd68ad3)) +* update package manager versions ([#330](https://github.com/nodejs/corepack/issues/330)) ([cfcc280](https://github.com/nodejs/corepack/commit/cfcc28047a788daeef2c0b15ee35a8b1a8149bb6)) +* **yarn:** fallback to npm when `COREPACK_NPM_REGISTRY` is set ([#339](https://github.com/nodejs/corepack/issues/339)) ([0717c6a](https://github.com/nodejs/corepack/commit/0717c6af898e075f57c5694d699a3c51e79a024c)) + + +### Bug Fixes + +* clarify `EACCES` errors ([#343](https://github.com/nodejs/corepack/issues/343)) ([518bed8](https://github.com/nodejs/corepack/commit/518bed8b7d7c313163c79d31cb9bbc023dba6560)) + +## [0.23.0](https://github.com/nodejs/corepack/compare/v0.22.0...v0.23.0) (2023-11-05) + + +### Features + +* update package manager versions ([#325](https://github.com/nodejs/corepack/issues/325)) ([450cd33](https://github.com/nodejs/corepack/commit/450cd332d00d3428f49ed09a4235bd12139931c9)) + +## [0.22.0](https://github.com/nodejs/corepack/compare/v0.21.0...v0.22.0) (2023-10-21) + + +### Features + +* allow fallback to application/json for custom registries ([#314](https://github.com/nodejs/corepack/issues/314)) ([92f8e71](https://github.com/nodejs/corepack/commit/92f8e71f8c97c44f404ce9b7df8787a4292e6830)) +* update package manager versions ([#318](https://github.com/nodejs/corepack/issues/318)) ([0bd2577](https://github.com/nodejs/corepack/commit/0bd2577bb4c6c3a5a33ecdb3b6ca2ff244c54f28)) + +## [0.21.0](https://github.com/nodejs/corepack/compare/v0.20.0...v0.21.0) (2023-10-08) + + +### ⚠ BREAKING CHANGES + +* remove support for Node.js 16.x + +### Features + +* update package manager versions ([#297](https://github.com/nodejs/corepack/issues/297)) ([503e135](https://github.com/nodejs/corepack/commit/503e135878935cc881ebd94b48d5eca94ec4c27b)) + + +### Miscellaneous Chores + +* update supported Node.js versions ([#309](https://github.com/nodejs/corepack/issues/309)) ([787e24d](https://github.com/nodejs/corepack/commit/787e24df609513702eafcd8c6a5f03544d7d45cc)) + +## [0.20.0](https://github.com/nodejs/corepack/compare/v0.19.0...v0.20.0) (2023-08-29) + + +### Features + +* refactor the CLI interface ([#291](https://github.com/nodejs/corepack/issues/291)) ([fe3e5cd](https://github.com/nodejs/corepack/commit/fe3e5cd86c45db0d87c7fdea87d57d59b0bdcb78)) +* update package manager versions ([#292](https://github.com/nodejs/corepack/issues/292)) ([be9c286](https://github.com/nodejs/corepack/commit/be9c286846443ff03081e736fdf4a0ff031fbd38)) + +## [0.19.0](https://github.com/nodejs/corepack/compare/v0.18.1...v0.19.0) (2023-06-24) + + +### Features + +* support ESM ([#270](https://github.com/nodejs/corepack/issues/270)) ([be2489c](https://github.com/nodejs/corepack/commit/be2489cd0aaabf26a019e1c089a3c8bcc329e94a)) +* update package manager versions ([#280](https://github.com/nodejs/corepack/issues/280)) ([4188f2b](https://github.com/nodejs/corepack/commit/4188f2b4671228339fe16f9f566e7bac0c2c4f6d)) + +## [0.18.1](https://github.com/nodejs/corepack/compare/v0.18.0...v0.18.1) (2023-06-13) + + +### Features + +* update package manager versions ([#272](https://github.com/nodejs/corepack/issues/272)) ([5345774](https://github.com/nodejs/corepack/commit/53457747a26a5de3debbd0d9282b338186bbd7c3)) + + +### Bug Fixes + +* disable `v8-compile-cache` when using `npm@>=9.7.0` ([#276](https://github.com/nodejs/corepack/issues/276)) ([2f3678c](https://github.com/nodejs/corepack/commit/2f3678cd7915978f4e2ce7a32cbe5db58e9d0b8d)) +* don't override `process.exitCode` ([#268](https://github.com/nodejs/corepack/issues/268)) ([17d1f3d](https://github.com/nodejs/corepack/commit/17d1f3dd41ef6127228d427fd5cca373d6c97f0f)) + +## [0.18.0](https://github.com/nodejs/corepack/compare/v0.17.2...v0.18.0) (2023-05-19) + + +### ⚠ BREAKING CHANGES + +* remove support for Node.js 14.x + +### Features + +* update package manager versions ([#256](https://github.com/nodejs/corepack/issues/256)) ([7b61ff6](https://github.com/nodejs/corepack/commit/7b61ff6bc797ec4ed50c2ba1e1f1689264cbf4fc)) + + +### Bug Fixes + +* **doc:** add a note about troubleshooting network errors ([#259](https://github.com/nodejs/corepack/issues/259)) ([aa3cbdb](https://github.com/nodejs/corepack/commit/aa3cbdb54fb21b8e0adde96dc781cdf750932843)) + + +### Miscellaneous Chores + +* update supported Node.js versions ([#258](https://github.com/nodejs/corepack/issues/258)) ([74f679d](https://github.com/nodejs/corepack/commit/74f679d8a72cc10a3720fc679b95e9bd086d95be)) + +## [0.17.2](https://github.com/nodejs/corepack/compare/v0.17.1...v0.17.2) (2023-04-07) + + +### Features + +* update package manager versions ([#249](https://github.com/nodejs/corepack/issues/249)) ([2507e9b](https://github.com/nodejs/corepack/commit/2507e9b317eacdeb939aee086de5711218ebd794)) + +## [0.17.1](https://github.com/nodejs/corepack/compare/v0.17.0...v0.17.1) (2023-03-17) + + +### Features + +* update package manager versions ([#245](https://github.com/nodejs/corepack/issues/245)) ([673f3b7](https://github.com/nodejs/corepack/commit/673f3b7f18421a49da1e2c55656666a74ce94474)) + +## [0.17.0](https://github.com/nodejs/corepack/compare/v0.16.0...v0.17.0) (2023-02-24) + + +### ⚠ BREAKING CHANGES + +* add `"exports"` to the `package.json` ([#239](https://github.com/nodejs/corepack/issues/239)) + +### Features + +* update package manager versions ([#242](https://github.com/nodejs/corepack/issues/242)) ([5141639](https://github.com/nodejs/corepack/commit/5141639af8198a343105be1e98a74f7c9e152472)) + + +### Bug Fixes + +* add `"exports"` to the `package.json` ([#239](https://github.com/nodejs/corepack/issues/239)) ([8e12d08](https://github.com/nodejs/corepack/commit/8e12d088dec171c03e90f623895a1fbf867130e6)) + +## [0.16.0](https://github.com/nodejs/corepack/compare/v0.15.3...v0.16.0) (2023-02-17) + + +### Features + +* update package manager versions ([#228](https://github.com/nodejs/corepack/issues/228)) ([bb000f9](https://github.com/nodejs/corepack/commit/bb000f9c10a1fbd85f2c15a90218d90b42473130)) +* build: migrate to ESBuild ([#229](https://github.com/nodejs/corepack/pull/229)) ([15ceb83](https://github.com/nodejs/corepack/commit/15ceb832a34a223efbe3d3f9cb792d9101a7022a)) + + +### Bug Fixes + +* npm registry override ([#219](https://github.com/nodejs/corepack/issues/219)) ([1b35362](https://github.com/nodejs/corepack/commit/1b353624e644874d9ef6c9acaf6d1254bff3015a)) + +## [0.15.3](https://github.com/nodejs/corepack/compare/v0.15.2...v0.15.3) (2022-12-30) + + +### Features + +* update package manager versions ([#215](https://github.com/nodejs/corepack/issues/215)) ([f84cfcb](https://github.com/nodejs/corepack/commit/f84cfcb00ffb985d44b6aa0b563b2b4056a8f0d0)) + +## [0.15.2](https://github.com/nodejs/corepack/compare/v0.15.1...v0.15.2) (2022-11-25) + + +### Features + +* update package manager versions ([#211](https://github.com/nodejs/corepack/issues/211)) ([c536c0c](https://github.com/nodejs/corepack/commit/c536c0c27c137c87a14487a2c2a63a1fe6bf88ec)) + +## [0.15.1](https://github.com/nodejs/corepack/compare/v0.15.0...v0.15.1) (2022-11-04) + + +### Features + +* update package manager versions ([#205](https://github.com/nodejs/corepack/issues/205)) ([5bfac11](https://github.com/nodejs/corepack/commit/5bfac11715474a4318c67fc806fd1ff4252c683a)) + +## [0.15.0](https://github.com/nodejs/corepack/compare/v0.14.2...v0.15.0) (2022-10-28) + + +### Features + +* add support for configurable registries and applicable auth options ([#186](https://github.com/nodejs/corepack/issues/186)) ([662ae90](https://github.com/nodejs/corepack/commit/662ae9057c7360cb05e9476914e611a9bf0074db)) +* update package manager versions ([#193](https://github.com/nodejs/corepack/issues/193)) ([0ec3a73](https://github.com/nodejs/corepack/commit/0ec3a7384729c5cf4ac566d91f1a4bb74e08a64f)) +* when strict checking is off, treat like transparent ([#197](https://github.com/nodejs/corepack/issues/197)) ([5eadc50](https://github.com/nodejs/corepack/commit/5eadc50192e205c60bfb1cad91854e9014a747b8)) + + +### Bug Fixes + +* **doc:** add package configuration instruction to readme ([#188](https://github.com/nodejs/corepack/issues/188)) ([0b7abb9](https://github.com/nodejs/corepack/commit/0b7abb9833d332bad97902260d31652482c274a0)) +* recreate cache folder if necessary ([#200](https://github.com/nodejs/corepack/issues/200)) ([7b5f2f9](https://github.com/nodejs/corepack/commit/7b5f2f9fcb24fe3fe517a96deaac7f32854f3124)) + +## [0.14.2](https://github.com/nodejs/corepack/compare/v0.14.1...v0.14.2) (2022-09-24) + +### Features + +* update package manager versions ([#184](https://github.com/nodejs/corepack/issues/184)) ([84ae313](https://github.com/nodejs/corepack/commit/84ae3139e4b9a86d97465e36b50beb9201fda732)) + +## [0.14.1](https://github.com/nodejs/corepack/compare/v0.14.0...v0.14.1) (2022-09-16) + + +### Features + +* update package manager versions ([#179](https://github.com/nodejs/corepack/issues/179)) ([0b88dcb](https://github.com/nodejs/corepack/commit/0b88dcbaaf190117c6f407b6632a4b3b10da8ad9)) + +## [0.14.0](https://github.com/nodejs/corepack/compare/v0.13.0...v0.14.0) (2022-09-02) + + +### Features + +* add `COREPACK_ENABLE_STRICT` env variable ([#167](https://github.com/nodejs/corepack/issues/167)) ([92b52f6](https://github.com/nodejs/corepack/commit/92b52f6b4918aff968c0942b89fc722ebf57bce2)) +* update package manager versions ([#170](https://github.com/nodejs/corepack/issues/170)) ([6f70bfc](https://github.com/nodejs/corepack/commit/6f70bfc4b6a8a57cccb1ff9cbf2f49240648f1ed)) + + +### Bug Fixes + +* handle tags including numbers in `prepare` command ([#165](https://github.com/nodejs/corepack/issues/165)) ([5a0727b](https://github.com/nodejs/corepack/commit/5a0727b43976e0dc299151876c0dde2c4a85174d)) + +## [0.13.0](https://github.com/nodejs/corepack/compare/v0.12.3...v0.13.0) (2022-08-19) + + +### Features + +* do not use `~/.node` as default value for `COREPACK_HOME` ([#152](https://github.com/nodejs/corepack/issues/152)) ([09e24cf](https://github.com/nodejs/corepack/commit/09e24cf497de27fe92668cf0a8e555f2c7e2530d)) +* download the latest version instead of a pinned one ([#134](https://github.com/nodejs/corepack/issues/134)) ([055b928](https://github.com/nodejs/corepack/commit/055b92807f711b5c8c8be6e62b8d3ce83e1ff002)) +* update package manager versions ([#163](https://github.com/nodejs/corepack/issues/163)) ([af38d5a](https://github.com/nodejs/corepack/commit/af38d5afbbc10d61265b2f4687c5cc498b059b41)) + +## [0.12.3](https://github.com/nodejs/corepack/compare/v0.12.2...v0.12.3) (2022-08-12) + + +### Features + +* update package manager versions ([#160](https://github.com/nodejs/corepack/issues/160)) ([ad092a7](https://github.com/nodejs/corepack/commit/ad092a7fb4296143fa5224c04dbd628451b3c158)) + +## [0.12.2](https://github.com/nodejs/corepack/compare/v0.12.1...v0.12.2) (2022-08-05) + +### Features + +* update package manager versions ([#154](https://github.com/nodejs/corepack/issues/154)) ([4b95fd3](https://github.com/nodejs/corepack/commit/4b95fd3b926659855970a887c893c10db0b98e5d)) + +## [0.12.1](https://github.com/nodejs/corepack/compare/v0.12.0...v0.12.1) (2022-07-21) + + +### Bug Fixes + +* **doc:** update DESIGN.md s/engines.pm/packageManager/ ([#141](https://github.com/nodejs/corepack/issues/141)) ([d6039c5](https://github.com/nodejs/corepack/commit/d6039c5b16cdddb33069b9aa864854ed16d17e4e)) +* update package manager versions ([#146](https://github.com/nodejs/corepack/issues/146)) ([fdb187a](https://github.com/nodejs/corepack/commit/fdb187a640de77df9b3688623ba510bdafda8702)) + +## [0.12.0](https://github.com/nodejs/corepack/compare/v0.11.2...v0.12.0) (2022-07-09) + + +### Features + +* add support for hash checking ([#133](https://github.com/nodejs/corepack/issues/133)) ([6a480a7](https://github.com/nodejs/corepack/commit/6a480a72c2e9fc6725f2ab6dfaf4c52e4d3d2ade)) +* add support for tags and ranges in `prepare` command ([#136](https://github.com/nodejs/corepack/issues/136)) ([29da06c](https://github.com/nodejs/corepack/commit/29da06c515e917829e5ffbedb34284a6597e9d56)) +* update package manager versions ([#129](https://github.com/nodejs/corepack/issues/129)) ([2470f58](https://github.com/nodejs/corepack/commit/2470f58b74491a1301221df643c55be5adf1d349)) +* update package manager versions ([#139](https://github.com/nodejs/corepack/issues/139)) ([cd0dcad](https://github.com/nodejs/corepack/commit/cd0dcade85621199048d7ca30dfc3efce11e1f37)) + + +### Bug Fixes + +* streamline the cache exploration ([#135](https://github.com/nodejs/corepack/issues/135)) ([185da44](https://github.com/nodejs/corepack/commit/185da44078fd1ca34aec2e4e6f8a52ecffcf3c11)) + +## [0.11.2](https://github.com/nodejs/corepack/compare/v0.11.1...v0.11.2) (2022-06-13) + +### Bug Fixes + +* only set bins on pack ([#127](https://github.com/nodejs/corepack/issues/127)) ([7ae489a](https://github.com/nodejs/corepack/commit/7ae489a86c3fe584b9915f4ec57deb7c316c1a25)) + +## [0.11.1](https://github.com/nodejs/corepack/compare/v0.11.0...v0.11.1) (2022-06-12) + + +### Bug Fixes + +* **ci:** YAML formatting in publish workflow ([#124](https://github.com/nodejs/corepack/issues/124)) ([01c7d63](https://github.com/nodejs/corepack/commit/01c7d638b04a1340b3939a7985e24b586e344995)) + +## 0.11.0 (2022-06-12) + + +### Features + +* auto setup proxy for http requests ([#69](https://github.com/nodejs/corepack/issues/69)) ([876ce02](https://github.com/nodejs/corepack/commit/876ce02fe7385ea5bc896b2dc93d1fb320361c64)) + + +### Bug Fixes + +* avoid symlinks to work on Windows ([#13](https://github.com/nodejs/corepack/issues/13)) ([b56df30](https://github.com/nodejs/corepack/commit/b56df30796da9c7cb0ba5e1bb7152c81582abba6)) +* avoid using eval to get the corepack version ([#45](https://github.com/nodejs/corepack/issues/45)) ([78d94eb](https://github.com/nodejs/corepack/commit/78d94eb297444d7558e8b4395f0108c97117f8ab)) +* bin file name for pnpm >=6.0 ([#35](https://github.com/nodejs/corepack/issues/35)) ([8ff2499](https://github.com/nodejs/corepack/commit/8ff2499e831c8cf2dea604ea985d830afc8a479e)) +* generate cmd shim files ([a900b4d](https://github.com/nodejs/corepack/commit/a900b4db12fcd4d99c0a4d011b426cdc6485d323)) +* handle package managers with a bin array correctly ([#20](https://github.com/nodejs/corepack/issues/20)) ([1836d17](https://github.com/nodejs/corepack/commit/1836d17b4fc4c0164df2fe1ccaca4d2f16f6f2d1)) +* handle parallel installs ([#84](https://github.com/nodejs/corepack/issues/84)) ([5cfc6c9](https://github.com/nodejs/corepack/commit/5cfc6c9df0dbec8e4de4324be37aa0a54a300552)) +* handle prereleases ([#32](https://github.com/nodejs/corepack/issues/32)) ([2a46b6d](https://github.com/nodejs/corepack/commit/2a46b6d13adae139141012254ef670d6ddcb5d11)) + + +### Performance Improvements + +* load binaries in the same process ([#97](https://github.com/nodejs/corepack/issues/97)) ([5ff6e82](https://github.com/nodejs/corepack/commit/5ff6e82028e58448ba5ba986854b61ecdc69885b)) diff --git a/node_modules/corepack/LICENSE.md b/node_modules/corepack/LICENSE.md new file mode 100644 index 0000000000..965ccaa1ae --- /dev/null +++ b/node_modules/corepack/LICENSE.md @@ -0,0 +1,7 @@ +**Copyright © Corepack contributors** + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/corepack/README.md b/node_modules/corepack/README.md new file mode 100644 index 0000000000..7ddf1de400 --- /dev/null +++ b/node_modules/corepack/README.md @@ -0,0 +1,381 @@ +# corepack + +[![Join us on OpenJS slack (channel #nodejs-corepack)](https://img.shields.io/badge/OpenJS%20Slack-%23nodejs--corepack-blue)](https://slack-invite.openjsf.org/) + +Corepack is a zero-runtime-dependency Node.js script that acts as a bridge +between Node.js projects and the package managers they are intended to be used +with during development. In practical terms, **Corepack lets you use Yarn, npm, +and pnpm without having to install them**. + +## How to Install + +### Default Installs + +Corepack is distributed with Node.js from version 14.19.0 up to (but not including) 25.0.0. +Run `corepack enable` to install the required Yarn and pnpm binaries on your path. + +### Manual Installs + +
+Install Corepack using npm + +First uninstall your global Yarn and pnpm binaries (just leave npm). In general, +you'd do this by running the following command: + +```shell +npm uninstall -g yarn pnpm + +# That should be enough, but if you installed Yarn without going through npm it might +# be more tedious - for example, you might need to run `brew uninstall yarn` as well. +``` + +Then install Corepack: + +```shell +npm install -g corepack +``` + +We do acknowledge the irony and overhead of using npm to install Corepack, which +is at least part of why the preferred option is to use the Corepack version that +is distributed along with Node.js itself. + +
+ +
Update Corepack using npm + +To install the latest version of Corepack, use: + +```shell +npm install -g corepack@latest +``` + +If Corepack was installed on your system using a Node.js Windows Installer +`.msi` package then you might need to remove it before attempting to install a +different version of Corepack using npm. You can select the Modify option of the +Node.js app settings to access the Windows Installer feature selection, and on +the "corepack manager" feature of the Node.js `.msi` package by selecting +"Entire feature will be unavailable". See +[Repair apps and programs in Windows](https://support.microsoft.com/en-us/windows/repair-apps-and-programs-in-windows-e90eefe4-d0a2-7c1b-dd59-949a9030f317) +for instructions on accessing the Windows apps page to modify settings. + +
+ +
Install Corepack from source + +See [`CONTRIBUTING.md`](./CONTRIBUTING.md). + +
+ +## Usage + +### When Building Packages + +Just use your package managers as you usually would. Run `yarn install` in Yarn +projects, `pnpm install` in pnpm projects, and `npm` in npm projects. Corepack +will catch these calls, and depending on the situation: + +- **If the local project is configured for the package manager you're using**, + Corepack will download and cache the latest compatible version. + +- **If the local project is configured for a different package manager**, + Corepack will request you to run the command again using the right package + manager - thus avoiding corruptions of your install artifacts. + +- **If the local project isn't configured for any package manager**, Corepack + will assume that you know what you're doing, and will use whatever package + manager version has been pinned as "known good release". Check the relevant + section for more details. + +### When Authoring Packages + +Set your package's manager with the `packageManager` field in `package.json`: + +```json +{ + "packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" +} +``` + +Here, `yarn` is the name of the package manager, specified at version `3.2.3`, +along with the SHA-224 hash of this version for validation. +`packageManager@x.y.z` is required. The hash is optional but strongly +recommended as a security practice. Permitted values for the package manager are +`yarn`, `npm`, and `pnpm`. + +You can also provide a URL to a `.js` file (which will be interpreted as a +CommonJS module) or a `.tgz` file (which will be interpreted as a package, and +the `"bin"` field of the `package.json` will be used to determine which file to +use in the archive). + +```json +{ + "packageManager": "yarn@https://registry.npmjs.org/@yarnpkg/cli-dist/-/cli-dist-3.2.3.tgz#sha224.16a0797d1710d1fb7ec40ab5c3801b68370a612a9b66ba117ad9924b" +} +``` + +#### `devEngines.packageManager` + +When a `devEngines.packageManager` field is defined, and is an object containing +a `"name"` field (can also optionally contain `version` and `onFail` fields), +Corepack will use it to validate you're using a compatible package manager. + +Depending on the value of `devEngines.packageManager.onFail`: + +- if set to `ignore`, Corepack won't print any warning or error. +- if unset or set to `error`, Corepack will throw an error in case of a mismatch. +- if set to `warn` or some other value, Corepack will print a warning in case + of mismatch. + +If the top-level `packageManager` field is missing, Corepack will use the +package manager defined in `devEngines.packageManager` – in which case you must +provide a specific version in `devEngines.packageManager.version`, ideally with +a hash, as explained in the previous section: + +```json +{ + "devEngines":{ + "packageManager": { + "name": "yarn", + "version": "3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" + } + } +} +``` + +## Known Good Releases + +When running Corepack within projects that don't list a supported package +manager, it will default to a set of Known Good Releases. + +If there is no Known Good Release for the requested package manager, Corepack +looks up the npm registry for the latest available version and cache it for +future use. + +The Known Good Releases can be updated system-wide using `corepack install -g`. +When Corepack downloads a new version of a given package manager on the same +major line as the Known Good Release, it auto-updates it by default. + +## Offline Workflow + +The utility commands detailed in the next section. + +- Either you can use the network while building your container image, in which + case you'll simply run `corepack pack` to make sure that your image + includes the Last Known Good release for the specified package manager. + +- Or you're publishing your project to a system where the network is + unavailable, in which case you'll preemptively generate a package manager + archive from your local computer (using `corepack pack -o`) before storing + it somewhere your container will be able to access (for example within your + repository). After that it'll just be a matter of running + `corepack install -g --cache-only ` to setup the cache. + +## Utility Commands + +### `corepack [@] [... args]` + +This meta-command runs the specified package manager in the local folder. You +can use it to force an install to run with a given version, which can be useful +when looking for regressions. + +Note that those commands still check whether the local project is configured for +the given package manager (ie you won't be able to run `corepack yarn install` +on a project where the `packageManager` field references `pnpm`). + +### `corepack cache clean` + +Clears the local `COREPACK_HOME` cache directory. + +### `corepack cache clear` + +Clears the local `COREPACK_HOME` cache directory. + +### `corepack enable [... name]` + +| Option | Description | +| --------------------- | --------------------------------------- | +| `--install-directory` | Add the shims to the specified location | + +This command will detect where Corepack is installed and will create shims next +to it for each of the specified package managers (or all of them if the command +is called without parameters). Note that the npm shims will not be installed +unless explicitly requested, as npm is currently distributed with Node.js +through other means. + +If the file system where the `corepack` binary is located is read-only, this +command will fail. A workaround is to add the binaries as alias in your +shell configuration file (e.g. in `~/.bash_aliases`): + +```sh +alias yarn="corepack yarn" +alias yarnpkg="corepack yarnpkg" +alias pnpm="corepack pnpm" +alias pnpx="corepack pnpx" +alias npm="corepack npm" +alias npx="corepack npx" +``` + +On Windows PowerShell, you can add functions using the `$PROFILE` automatic +variable: + +```powershell +echo "function yarn { corepack yarn `$args }" >> $PROFILE +echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE +echo "function pnpm { corepack pnpm `$args }" >> $PROFILE +echo "function pnpx { corepack pnpx `$args }" >> $PROFILE +echo "function npm { corepack npm `$args }" >> $PROFILE +echo "function npx { corepack npx `$args }" >> $PROFILE +``` + +### `corepack disable [... name]` + +| Option | Description | +| --------------------- | ------------------------------------------ | +| `--install-directory` | Remove the shims to the specified location | + +This command will detect where Node.js is installed and will remove the shims +from there. + +### `corepack install` + +Download and install the package manager configured in the local project. +This command doesn't change the global version used when running the package +manager from outside the project (use the \`-g,--global\` flag if you wish +to do this). + +### `corepack install <-g,--global> [... name[@]]` + +Install the selected package managers and install them on the system. + +Package managers thus installed will be configured as the new default when +calling their respective binaries outside of projects defining the +`packageManager` field. + +### `corepack pack [... name[@]]` + +| Option | Description | +| --------------------- | ------------------------------------------ | +| `--json ` | Print the output folder rather than logs | +| `-o,--output ` | Path where to generate the archive | + +Download the selected package managers and store them inside a tarball +suitable for use with `corepack install -g`. + +### `corepack use ]>` + +When run, this command will retrieve the latest release matching the provided +descriptor, assign it to the project's package.json file, and automatically +perform an install. + +### `corepack up` + +Retrieve the latest available version for the current major release line of +the package manager used in the local project, and update the project to use +it. + +Unlike `corepack use` this command doesn't take a package manager name nor a +version range, as it will always select the latest available version from the +range specified in `devEngines.packageManager.version`, or fallback to the +same major line. Should you need to upgrade to a new major, use an explicit +`corepack use {name}@latest` call (or simply `corepack use {name}`). + +## Environment Variables + +- `COREPACK_DEFAULT_TO_LATEST` can be set to `0` in order to instruct Corepack + not to lookup on the remote registry for the latest version of the selected + package manager, and to not update the Last Known Good version when it + downloads a new version of the same major line. + +- `COREPACK_ENABLE_AUTO_PIN` can be set to `1` to instruct Corepack to + update the `packageManager` field when it detects that the local package + doesn't list it. In general we recommend to always list a `packageManager` + field (which you can easily set through `corepack use [name]@[version]`), as + it ensures that your project installs are always deterministic. + +- `COREPACK_ENABLE_DOWNLOAD_PROMPT` can be set to `0` to + prevent Corepack showing the URL when it needs to download software, or can be + set to `1` to have the URL shown. By default, when Corepack is called + explicitly (e.g. `corepack pnpm …`), it is set to `0`; when Corepack is called + implicitly (e.g. `pnpm …`), it is set to `1`. + The default value cannot be overridden in a `.corepack.env` file. + When standard input is a TTY and no CI environment is detected, Corepack will + ask for user input before starting the download. + +- `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS` can be set to `1` to allow use of + custom URLs to load a package manager known by Corepack (`yarn`, `npm`, and + `pnpm`). + +- `COREPACK_ENABLE_NETWORK` can be set to `0` to prevent Corepack from accessing + the network (in which case you'll be responsible for hydrating the package + manager versions that will be required for the projects you'll run, using + `corepack install -g --cache-only`). + +- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing + error if the package manager does not correspond to the one defined for the + current project. This means that if a user is using the package manager + specified in the current project, it will use the version specified by the + project's `packageManager` field. But if the user is using other package + manager different from the one specified for the current project, it will use + the system-wide package manager version. + +- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from + checking if the package manager corresponds to the one defined for the current + project. This means that it will always use the system-wide package manager + regardless of what is being specified in the project's `packageManager` field. + +- `COREPACK_ENV_FILE` can be set to `0` to request Corepack to not attempt to + load `.corepack.env`; it can be set to a path to specify a different env file. + Only keys that start with `COREPACK_` and are not in the exception list + (`COREPACK_ENABLE_DOWNLOAD_PROMPT` and `COREPACK_ENV_FILE` are ignored) + will be taken into account. + For Node.js 18.x users, this setting has no effect as that version doesn't + support parsing of `.env` files. + +- `COREPACK_HOME` can be set in order to define where Corepack should install + the package managers. By default it is set to `%LOCALAPPDATA%\node\corepack` + on Windows, and to `$HOME/.cache/node/corepack` everywhere else. + +- `COREPACK_ROOT` has no functional impact on Corepack itself; it's + automatically being set in your environment by Corepack when it shells out to + the underlying package managers, so that they can feature-detect its presence + (useful for commands like `yarn init`). + +- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving + package managers from npm. Default value is `https://registry.npmjs.org` + +- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting + to a npm type registry. + +- `COREPACK_NPM_USERNAME` and `COREPACK_NPM_PASSWORD` to set a Basic + authorization header when connecting to a npm type registry. Note that both + environment variables are required and as plain text. If you want to send an + empty password, explicitly set `COREPACK_NPM_PASSWORD` to an empty string. + +- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through + [`proxy-from-env`](https://github.com/Rob--W/proxy-from-env). + +- `COREPACK_INTEGRITY_KEYS` can be set to an empty string or `0` to + instruct Corepack to skip integrity checks, or to a JSON string containing + custom keys. + +## Troubleshooting + +The environment variable `DEBUG` can be set to `corepack` to enable additional debug logging. + +### Networking + +There are a wide variety of networking issues that can occur while running +`corepack` commands. Things to check: + +- Make sure your network connection is active. +- Make sure the host for your request can be resolved by your DNS; try using + `curl [URL]` (ipv4) and `curl -6 [URL]` (ipv6) from your shell. +- Check your proxy settings (see [Environment Variables](#environment-variables)). + +## Contributing + +See [`CONTRIBUTING.md`](./CONTRIBUTING.md). + +## License (MIT) + +See [`LICENSE.md`](./LICENSE.md). diff --git a/node_modules/corepack/dist/corepack.js b/node_modules/corepack/dist/corepack.js new file mode 100755 index 0000000000..6179b11c08 --- /dev/null +++ b/node_modules/corepack/dist/corepack.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='0'; +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(process.argv.slice(2)); \ No newline at end of file diff --git a/node_modules/corepack/dist/lib/corepack.cjs b/node_modules/corepack/dist/lib/corepack.cjs new file mode 100644 index 0000000000..51e21814c1 --- /dev/null +++ b/node_modules/corepack/dist/lib/corepack.cjs @@ -0,0 +1,23713 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn2, res) => function __init() { + return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name2 in all) + __defProp(target, name2, { get: all[name2], enumerable: true }); +}; +var __copyProps = (to, from, except, desc2) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// .yarn/cache/typanion-npm-3.14.0-8af344c436-8b03b19844.zip/node_modules/typanion/lib/index.mjs +var lib_exports = {}; +__export(lib_exports, { + KeyRelationship: () => KeyRelationship, + TypeAssertionError: () => TypeAssertionError, + applyCascade: () => applyCascade, + as: () => as, + assert: () => assert, + assertWithErrors: () => assertWithErrors, + cascade: () => cascade, + fn: () => fn, + hasAtLeastOneKey: () => hasAtLeastOneKey, + hasExactLength: () => hasExactLength, + hasForbiddenKeys: () => hasForbiddenKeys, + hasKeyRelationship: () => hasKeyRelationship, + hasMaxLength: () => hasMaxLength, + hasMinLength: () => hasMinLength, + hasMutuallyExclusiveKeys: () => hasMutuallyExclusiveKeys, + hasRequiredKeys: () => hasRequiredKeys, + hasUniqueItems: () => hasUniqueItems, + isArray: () => isArray, + isAtLeast: () => isAtLeast, + isAtMost: () => isAtMost, + isBase64: () => isBase64, + isBoolean: () => isBoolean, + isDate: () => isDate, + isDict: () => isDict, + isEnum: () => isEnum, + isHexColor: () => isHexColor, + isISO8601: () => isISO8601, + isInExclusiveRange: () => isInExclusiveRange, + isInInclusiveRange: () => isInInclusiveRange, + isInstanceOf: () => isInstanceOf, + isInteger: () => isInteger, + isJSON: () => isJSON, + isLiteral: () => isLiteral, + isLowerCase: () => isLowerCase, + isMap: () => isMap, + isNegative: () => isNegative, + isNullable: () => isNullable, + isNumber: () => isNumber, + isObject: () => isObject, + isOneOf: () => isOneOf, + isOptional: () => isOptional, + isPartial: () => isPartial, + isPayload: () => isPayload, + isPositive: () => isPositive, + isRecord: () => isRecord, + isSet: () => isSet, + isString: () => isString, + isTuple: () => isTuple, + isUUID4: () => isUUID4, + isUnknown: () => isUnknown, + isUpperCase: () => isUpperCase, + makeTrait: () => makeTrait, + makeValidator: () => makeValidator, + matchesRegExp: () => matchesRegExp, + softAssert: () => softAssert +}); +function getPrintable(value) { + if (value === null) + return `null`; + if (value === void 0) + return `undefined`; + if (value === ``) + return `an empty string`; + if (typeof value === "symbol") + return `<${value.toString()}>`; + if (Array.isArray(value)) + return `an array`; + return JSON.stringify(value); +} +function getPrintableArray(value, conjunction) { + if (value.length === 0) + return `nothing`; + if (value.length === 1) + return getPrintable(value[0]); + const rest = value.slice(0, -1); + const trailing = value[value.length - 1]; + const separator = value.length > 2 ? `, ${conjunction} ` : ` ${conjunction} `; + return `${rest.map((value2) => getPrintable(value2)).join(`, `)}${separator}${getPrintable(trailing)}`; +} +function computeKey(state, key) { + var _a, _b, _c; + if (typeof key === `number`) { + return `${(_a = state === null || state === void 0 ? void 0 : state.p) !== null && _a !== void 0 ? _a : `.`}[${key}]`; + } else if (simpleKeyRegExp.test(key)) { + return `${(_b = state === null || state === void 0 ? void 0 : state.p) !== null && _b !== void 0 ? _b : ``}.${key}`; + } else { + return `${(_c = state === null || state === void 0 ? void 0 : state.p) !== null && _c !== void 0 ? _c : `.`}[${JSON.stringify(key)}]`; + } +} +function plural(n, singular, plural2) { + return n === 1 ? singular : plural2; +} +function pushError({ errors, p } = {}, message) { + errors === null || errors === void 0 ? void 0 : errors.push(`${p !== null && p !== void 0 ? p : `.`}: ${message}`); + return false; +} +function makeSetter(target, key) { + return (v) => { + target[key] = v; + }; +} +function makeCoercionFn(target, key) { + return (v) => { + const previous = target[key]; + target[key] = v; + return makeCoercionFn(target, key).bind(null, previous); + }; +} +function makeLazyCoercionFn(fn2, orig, generator) { + const commit = () => { + fn2(generator()); + return revert; + }; + const revert = () => { + fn2(orig); + return commit; + }; + return commit; +} +function isUnknown() { + return makeValidator({ + test: (value, state) => { + return true; + } + }); +} +function isLiteral(expected) { + return makeValidator({ + test: (value, state) => { + if (value !== expected) + return pushError(state, `Expected ${getPrintable(expected)} (got ${getPrintable(value)})`); + return true; + } + }); +} +function isString() { + return makeValidator({ + test: (value, state) => { + if (typeof value !== `string`) + return pushError(state, `Expected a string (got ${getPrintable(value)})`); + return true; + } + }); +} +function isEnum(enumSpec) { + const valuesArray = Array.isArray(enumSpec) ? enumSpec : Object.values(enumSpec); + const isAlphaNum = valuesArray.every((item) => typeof item === "string" || typeof item === "number"); + const values = new Set(valuesArray); + if (values.size === 1) + return isLiteral([...values][0]); + return makeValidator({ + test: (value, state) => { + if (!values.has(value)) { + if (isAlphaNum) { + return pushError(state, `Expected one of ${getPrintableArray(valuesArray, `or`)} (got ${getPrintable(value)})`); + } else { + return pushError(state, `Expected a valid enumeration value (got ${getPrintable(value)})`); + } + } + return true; + } + }); +} +function isBoolean() { + return makeValidator({ + test: (value, state) => { + var _a; + if (typeof value !== `boolean`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + const coercion = BOOLEAN_COERCIONS.get(value); + if (typeof coercion !== `undefined`) { + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]); + return true; + } + } + return pushError(state, `Expected a boolean (got ${getPrintable(value)})`); + } + return true; + } + }); +} +function isNumber() { + return makeValidator({ + test: (value, state) => { + var _a; + if (typeof value !== `number`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + let coercion; + if (typeof value === `string`) { + let val; + try { + val = JSON.parse(value); + } catch (_b) { + } + if (typeof val === `number`) { + if (JSON.stringify(val) === value) { + coercion = val; + } else { + return pushError(state, `Received a number that can't be safely represented by the runtime (${value})`); + } + } + } + if (typeof coercion !== `undefined`) { + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]); + return true; + } + } + return pushError(state, `Expected a number (got ${getPrintable(value)})`); + } + return true; + } + }); +} +function isPayload(spec) { + return makeValidator({ + test: (value, state) => { + var _a; + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) === `undefined`) + return pushError(state, `The isPayload predicate can only be used with coercion enabled`); + if (typeof state.coercion === `undefined`) + return pushError(state, `Unbound coercion result`); + if (typeof value !== `string`) + return pushError(state, `Expected a string (got ${getPrintable(value)})`); + let inner; + try { + inner = JSON.parse(value); + } catch (_b) { + return pushError(state, `Expected a JSON string (got ${getPrintable(value)})`); + } + const wrapper = { value: inner }; + if (!spec(inner, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(wrapper, `value`) }))) + return false; + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, wrapper.value)]); + return true; + } + }); +} +function isDate() { + return makeValidator({ + test: (value, state) => { + var _a; + if (!(value instanceof Date)) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + let coercion; + if (typeof value === `string` && iso8601RegExp.test(value)) { + coercion = new Date(value); + } else { + let timestamp; + if (typeof value === `string`) { + let val; + try { + val = JSON.parse(value); + } catch (_b) { + } + if (typeof val === `number`) { + timestamp = val; + } + } else if (typeof value === `number`) { + timestamp = value; + } + if (typeof timestamp !== `undefined`) { + if (Number.isSafeInteger(timestamp) || !Number.isSafeInteger(timestamp * 1e3)) { + coercion = new Date(timestamp * 1e3); + } else { + return pushError(state, `Received a timestamp that can't be safely represented by the runtime (${value})`); + } + } + } + if (typeof coercion !== `undefined`) { + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]); + return true; + } + } + return pushError(state, `Expected a date (got ${getPrintable(value)})`); + } + return true; + } + }); +} +function isArray(spec, { delimiter } = {}) { + return makeValidator({ + test: (value, state) => { + var _a; + const originalValue = value; + if (typeof value === `string` && typeof delimiter !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + value = value.split(delimiter); + } + } + if (!Array.isArray(value)) + return pushError(state, `Expected an array (got ${getPrintable(value)})`); + let valid = true; + for (let t = 0, T = value.length; t < T; ++t) { + valid = spec(value[t], Object.assign(Object.assign({}, state), { p: computeKey(state, t), coercion: makeCoercionFn(value, t) })) && valid; + if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { + break; + } + } + if (value !== originalValue) + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]); + return valid; + } + }); +} +function isSet(spec, { delimiter } = {}) { + const isArrayValidator = isArray(spec, { delimiter }); + return makeValidator({ + test: (value, state) => { + var _a, _b; + if (Object.getPrototypeOf(value).toString() === `[object Set]`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + const originalValues = [...value]; + const coercedValues = [...value]; + if (!isArrayValidator(coercedValues, Object.assign(Object.assign({}, state), { coercion: void 0 }))) + return false; + const updateValue = () => coercedValues.some((val, t) => val !== originalValues[t]) ? new Set(coercedValues) : value; + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, makeLazyCoercionFn(state.coercion, value, updateValue)]); + return true; + } else { + let valid = true; + for (const subValue of value) { + valid = spec(subValue, Object.assign({}, state)) && valid; + if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { + break; + } + } + return valid; + } + } + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + const store = { value }; + if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(store, `value`) }))) + return false; + state.coercions.push([(_b = state.p) !== null && _b !== void 0 ? _b : `.`, makeLazyCoercionFn(state.coercion, value, () => new Set(store.value))]); + return true; + } + return pushError(state, `Expected a set (got ${getPrintable(value)})`); + } + }); +} +function isMap(keySpec, valueSpec) { + const isArrayValidator = isArray(isTuple([keySpec, valueSpec])); + const isRecordValidator = isRecord(valueSpec, { keys: keySpec }); + return makeValidator({ + test: (value, state) => { + var _a, _b, _c; + if (Object.getPrototypeOf(value).toString() === `[object Map]`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + const originalValues = [...value]; + const coercedValues = [...value]; + if (!isArrayValidator(coercedValues, Object.assign(Object.assign({}, state), { coercion: void 0 }))) + return false; + const updateValue = () => coercedValues.some((val, t) => val[0] !== originalValues[t][0] || val[1] !== originalValues[t][1]) ? new Map(coercedValues) : value; + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, makeLazyCoercionFn(state.coercion, value, updateValue)]); + return true; + } else { + let valid = true; + for (const [key, subValue] of value) { + valid = keySpec(key, Object.assign({}, state)) && valid; + if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { + break; + } + valid = valueSpec(subValue, Object.assign(Object.assign({}, state), { p: computeKey(state, key) })) && valid; + if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { + break; + } + } + return valid; + } + } + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + const store = { value }; + if (Array.isArray(value)) { + if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: void 0 }))) + return false; + state.coercions.push([(_b = state.p) !== null && _b !== void 0 ? _b : `.`, makeLazyCoercionFn(state.coercion, value, () => new Map(store.value))]); + return true; + } else { + if (!isRecordValidator(value, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(store, `value`) }))) + return false; + state.coercions.push([(_c = state.p) !== null && _c !== void 0 ? _c : `.`, makeLazyCoercionFn(state.coercion, value, () => new Map(Object.entries(store.value)))]); + return true; + } + } + return pushError(state, `Expected a map (got ${getPrintable(value)})`); + } + }); +} +function isTuple(spec, { delimiter } = {}) { + const lengthValidator = hasExactLength(spec.length); + return makeValidator({ + test: (value, state) => { + var _a; + if (typeof value === `string` && typeof delimiter !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + value = value.split(delimiter); + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]); + } + } + if (!Array.isArray(value)) + return pushError(state, `Expected a tuple (got ${getPrintable(value)})`); + let valid = lengthValidator(value, Object.assign({}, state)); + for (let t = 0, T = value.length; t < T && t < spec.length; ++t) { + valid = spec[t](value[t], Object.assign(Object.assign({}, state), { p: computeKey(state, t), coercion: makeCoercionFn(value, t) })) && valid; + if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { + break; + } + } + return valid; + } + }); +} +function isRecord(spec, { keys: keySpec = null } = {}) { + const isArrayValidator = isArray(isTuple([keySpec !== null && keySpec !== void 0 ? keySpec : isString(), spec])); + return makeValidator({ + test: (value, state) => { + var _a; + if (Array.isArray(value)) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: void 0 }))) + return false; + value = Object.fromEntries(value); + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]); + return true; + } + } + if (typeof value !== `object` || value === null) + return pushError(state, `Expected an object (got ${getPrintable(value)})`); + const keys = Object.keys(value); + let valid = true; + for (let t = 0, T = keys.length; t < T && (valid || (state === null || state === void 0 ? void 0 : state.errors) != null); ++t) { + const key = keys[t]; + const sub = value[key]; + if (key === `__proto__` || key === `constructor`) { + valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Unsafe property name`); + continue; + } + if (keySpec !== null && !keySpec(key, state)) { + valid = false; + continue; + } + if (!spec(sub, Object.assign(Object.assign({}, state), { p: computeKey(state, key), coercion: makeCoercionFn(value, key) }))) { + valid = false; + continue; + } + } + return valid; + } + }); +} +function isDict(spec, opts = {}) { + return isRecord(spec, opts); +} +function isObject(props, { extra: extraSpec = null } = {}) { + const specKeys = Object.keys(props); + const validator = makeValidator({ + test: (value, state) => { + if (typeof value !== `object` || value === null) + return pushError(state, `Expected an object (got ${getPrintable(value)})`); + const keys = /* @__PURE__ */ new Set([...specKeys, ...Object.keys(value)]); + const extra = {}; + let valid = true; + for (const key of keys) { + if (key === `constructor` || key === `__proto__`) { + valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Unsafe property name`); + } else { + const spec = Object.prototype.hasOwnProperty.call(props, key) ? props[key] : void 0; + const sub = Object.prototype.hasOwnProperty.call(value, key) ? value[key] : void 0; + if (typeof spec !== `undefined`) { + valid = spec(sub, Object.assign(Object.assign({}, state), { p: computeKey(state, key), coercion: makeCoercionFn(value, key) })) && valid; + } else if (extraSpec === null) { + valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Extraneous property (got ${getPrintable(sub)})`); + } else { + Object.defineProperty(extra, key, { + enumerable: true, + get: () => sub, + set: makeSetter(value, key) + }); + } + } + if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { + break; + } + } + if (extraSpec !== null && (valid || (state === null || state === void 0 ? void 0 : state.errors) != null)) + valid = extraSpec(extra, state) && valid; + return valid; + } + }); + return Object.assign(validator, { + properties: props + }); +} +function isPartial(props) { + return isObject(props, { extra: isRecord(isUnknown()) }); +} +function makeTrait(value) { + return () => { + return value; + }; +} +function makeValidator({ test }) { + return makeTrait(test)(); +} +function assert(val, validator) { + if (!validator(val)) { + throw new TypeAssertionError(); + } +} +function assertWithErrors(val, validator) { + const errors = []; + if (!validator(val, { errors })) { + throw new TypeAssertionError({ errors }); + } +} +function softAssert(val, validator) { +} +function as(value, validator, { coerce = false, errors: storeErrors, throw: throws } = {}) { + const errors = storeErrors ? [] : void 0; + if (!coerce) { + if (validator(value, { errors })) { + return throws ? value : { value, errors: void 0 }; + } else if (!throws) { + return { value: void 0, errors: errors !== null && errors !== void 0 ? errors : true }; + } else { + throw new TypeAssertionError({ errors }); + } + } + const state = { value }; + const coercion = makeCoercionFn(state, `value`); + const coercions = []; + if (!validator(value, { errors, coercion, coercions })) { + if (!throws) { + return { value: void 0, errors: errors !== null && errors !== void 0 ? errors : true }; + } else { + throw new TypeAssertionError({ errors }); + } + } + for (const [, apply] of coercions) + apply(); + if (throws) { + return state.value; + } else { + return { value: state.value, errors: void 0 }; + } +} +function fn(validators, fn2) { + const isValidArgList = isTuple(validators); + return ((...args) => { + const check = isValidArgList(args); + if (!check) + throw new TypeAssertionError(); + return fn2(...args); + }); +} +function hasMinLength(length) { + return makeValidator({ + test: (value, state) => { + if (!(value.length >= length)) + return pushError(state, `Expected to have a length of at least ${length} elements (got ${value.length})`); + return true; + } + }); +} +function hasMaxLength(length) { + return makeValidator({ + test: (value, state) => { + if (!(value.length <= length)) + return pushError(state, `Expected to have a length of at most ${length} elements (got ${value.length})`); + return true; + } + }); +} +function hasExactLength(length) { + return makeValidator({ + test: (value, state) => { + if (!(value.length === length)) + return pushError(state, `Expected to have a length of exactly ${length} elements (got ${value.length})`); + return true; + } + }); +} +function hasUniqueItems({ map } = {}) { + return makeValidator({ + test: (value, state) => { + const set = /* @__PURE__ */ new Set(); + const dup = /* @__PURE__ */ new Set(); + for (let t = 0, T = value.length; t < T; ++t) { + const sub = value[t]; + const key = typeof map !== `undefined` ? map(sub) : sub; + if (set.has(key)) { + if (dup.has(key)) + continue; + pushError(state, `Expected to contain unique elements; got a duplicate with ${getPrintable(value)}`); + dup.add(key); + } else { + set.add(key); + } + } + return dup.size === 0; + } + }); +} +function isNegative() { + return makeValidator({ + test: (value, state) => { + if (!(value <= 0)) + return pushError(state, `Expected to be negative (got ${value})`); + return true; + } + }); +} +function isPositive() { + return makeValidator({ + test: (value, state) => { + if (!(value >= 0)) + return pushError(state, `Expected to be positive (got ${value})`); + return true; + } + }); +} +function isAtLeast(n) { + return makeValidator({ + test: (value, state) => { + if (!(value >= n)) + return pushError(state, `Expected to be at least ${n} (got ${value})`); + return true; + } + }); +} +function isAtMost(n) { + return makeValidator({ + test: (value, state) => { + if (!(value <= n)) + return pushError(state, `Expected to be at most ${n} (got ${value})`); + return true; + } + }); +} +function isInInclusiveRange(a, b) { + return makeValidator({ + test: (value, state) => { + if (!(value >= a && value <= b)) + return pushError(state, `Expected to be in the [${a}; ${b}] range (got ${value})`); + return true; + } + }); +} +function isInExclusiveRange(a, b) { + return makeValidator({ + test: (value, state) => { + if (!(value >= a && value < b)) + return pushError(state, `Expected to be in the [${a}; ${b}[ range (got ${value})`); + return true; + } + }); +} +function isInteger({ unsafe = false } = {}) { + return makeValidator({ + test: (value, state) => { + if (value !== Math.round(value)) + return pushError(state, `Expected to be an integer (got ${value})`); + if (!unsafe && !Number.isSafeInteger(value)) + return pushError(state, `Expected to be a safe integer (got ${value})`); + return true; + } + }); +} +function matchesRegExp(regExp) { + return makeValidator({ + test: (value, state) => { + if (!regExp.test(value)) + return pushError(state, `Expected to match the pattern ${regExp.toString()} (got ${getPrintable(value)})`); + return true; + } + }); +} +function isLowerCase() { + return makeValidator({ + test: (value, state) => { + if (value !== value.toLowerCase()) + return pushError(state, `Expected to be all-lowercase (got ${value})`); + return true; + } + }); +} +function isUpperCase() { + return makeValidator({ + test: (value, state) => { + if (value !== value.toUpperCase()) + return pushError(state, `Expected to be all-uppercase (got ${value})`); + return true; + } + }); +} +function isUUID4() { + return makeValidator({ + test: (value, state) => { + if (!uuid4RegExp.test(value)) + return pushError(state, `Expected to be a valid UUID v4 (got ${getPrintable(value)})`); + return true; + } + }); +} +function isISO8601() { + return makeValidator({ + test: (value, state) => { + if (!iso8601RegExp.test(value)) + return pushError(state, `Expected to be a valid ISO 8601 date string (got ${getPrintable(value)})`); + return true; + } + }); +} +function isHexColor({ alpha = false }) { + return makeValidator({ + test: (value, state) => { + const res = alpha ? colorStringRegExp.test(value) : colorStringAlphaRegExp.test(value); + if (!res) + return pushError(state, `Expected to be a valid hexadecimal color string (got ${getPrintable(value)})`); + return true; + } + }); +} +function isBase64() { + return makeValidator({ + test: (value, state) => { + if (!base64RegExp.test(value)) + return pushError(state, `Expected to be a valid base 64 string (got ${getPrintable(value)})`); + return true; + } + }); +} +function isJSON(spec = isUnknown()) { + return makeValidator({ + test: (value, state) => { + let data; + try { + data = JSON.parse(value); + } catch (_a) { + return pushError(state, `Expected to be a valid JSON string (got ${getPrintable(value)})`); + } + return spec(data, state); + } + }); +} +function cascade(spec, ...followups) { + const resolvedFollowups = Array.isArray(followups[0]) ? followups[0] : followups; + return makeValidator({ + test: (value, state) => { + var _a, _b; + const context = { value }; + const subCoercion = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? makeCoercionFn(context, `value`) : void 0; + const subCoercions = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? [] : void 0; + if (!spec(value, Object.assign(Object.assign({}, state), { coercion: subCoercion, coercions: subCoercions }))) + return false; + const reverts = []; + if (typeof subCoercions !== `undefined`) + for (const [, coercion] of subCoercions) + reverts.push(coercion()); + try { + if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { + if (context.value !== value) { + if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) + return pushError(state, `Unbound coercion result`); + state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, context.value)]); + } + (_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions); + } + return resolvedFollowups.every((spec2) => { + return spec2(context.value, state); + }); + } finally { + for (const revert of reverts) { + revert(); + } + } + } + }); +} +function applyCascade(spec, ...followups) { + const resolvedFollowups = Array.isArray(followups[0]) ? followups[0] : followups; + return cascade(spec, resolvedFollowups); +} +function isOptional(spec) { + return makeValidator({ + test: (value, state) => { + if (typeof value === `undefined`) + return true; + return spec(value, state); + } + }); +} +function isNullable(spec) { + return makeValidator({ + test: (value, state) => { + if (value === null) + return true; + return spec(value, state); + } + }); +} +function hasRequiredKeys(requiredKeys, options) { + var _a; + const requiredSet = new Set(requiredKeys); + const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; + return makeValidator({ + test: (value, state) => { + const keys = new Set(Object.keys(value)); + const problems = []; + for (const key of requiredSet) + if (!check(keys, key, value)) + problems.push(key); + if (problems.length > 0) + return pushError(state, `Missing required ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, `and`)}`); + return true; + } + }); +} +function hasAtLeastOneKey(requiredKeys, options) { + var _a; + const requiredSet = new Set(requiredKeys); + const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; + return makeValidator({ + test: (value, state) => { + const keys = Object.keys(value); + const valid = keys.some((key) => check(requiredSet, key, value)); + if (!valid) + return pushError(state, `Missing at least one property from ${getPrintableArray(Array.from(requiredSet), `or`)}`); + return true; + } + }); +} +function hasForbiddenKeys(forbiddenKeys, options) { + var _a; + const forbiddenSet = new Set(forbiddenKeys); + const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; + return makeValidator({ + test: (value, state) => { + const keys = new Set(Object.keys(value)); + const problems = []; + for (const key of forbiddenSet) + if (check(keys, key, value)) + problems.push(key); + if (problems.length > 0) + return pushError(state, `Forbidden ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, `and`)}`); + return true; + } + }); +} +function hasMutuallyExclusiveKeys(exclusiveKeys, options) { + var _a; + const exclusiveSet = new Set(exclusiveKeys); + const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; + return makeValidator({ + test: (value, state) => { + const keys = new Set(Object.keys(value)); + const used = []; + for (const key of exclusiveSet) + if (check(keys, key, value)) + used.push(key); + if (used.length > 1) + return pushError(state, `Mutually exclusive properties ${getPrintableArray(used, `and`)}`); + return true; + } + }); +} +function hasKeyRelationship(subject, relationship, others, options) { + var _a, _b; + const skipped = new Set((_a = options === null || options === void 0 ? void 0 : options.ignore) !== null && _a !== void 0 ? _a : []); + const check = checks[(_b = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _b !== void 0 ? _b : "missing"]; + const otherSet = new Set(others); + const spec = keyRelationships[relationship]; + const conjunction = relationship === KeyRelationship.Forbids ? `or` : `and`; + return makeValidator({ + test: (value, state) => { + const keys = new Set(Object.keys(value)); + if (!check(keys, subject, value) || skipped.has(value[subject])) + return true; + const problems = []; + for (const key of otherSet) + if ((check(keys, key, value) && !skipped.has(value[key])) !== spec.expect) + problems.push(key); + if (problems.length >= 1) + return pushError(state, `Property "${subject}" ${spec.message} ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, conjunction)}`); + return true; + } + }); +} +var simpleKeyRegExp, colorStringRegExp, colorStringAlphaRegExp, base64RegExp, uuid4RegExp, iso8601RegExp, BOOLEAN_COERCIONS, isInstanceOf, isOneOf, TypeAssertionError, checks, KeyRelationship, keyRelationships; +var init_lib = __esm({ + ".yarn/cache/typanion-npm-3.14.0-8af344c436-8b03b19844.zip/node_modules/typanion/lib/index.mjs"() { + simpleKeyRegExp = /^[a-zA-Z_][a-zA-Z0-9_]*$/; + colorStringRegExp = /^#[0-9a-f]{6}$/i; + colorStringAlphaRegExp = /^#[0-9a-f]{6}([0-9a-f]{2})?$/i; + base64RegExp = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + uuid4RegExp = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i; + iso8601RegExp = /^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/; + BOOLEAN_COERCIONS = /* @__PURE__ */ new Map([ + [`true`, true], + [`True`, true], + [`1`, true], + [1, true], + [`false`, false], + [`False`, false], + [`0`, false], + [0, false] + ]); + isInstanceOf = (constructor) => makeValidator({ + test: (value, state) => { + if (!(value instanceof constructor)) + return pushError(state, `Expected an instance of ${constructor.name} (got ${getPrintable(value)})`); + return true; + } + }); + isOneOf = (specs, { exclusive = false } = {}) => makeValidator({ + test: (value, state) => { + var _a, _b, _c; + const matches = []; + const errorBuffer = typeof (state === null || state === void 0 ? void 0 : state.errors) !== `undefined` ? [] : void 0; + for (let t = 0, T = specs.length; t < T; ++t) { + const subErrors = typeof (state === null || state === void 0 ? void 0 : state.errors) !== `undefined` ? [] : void 0; + const subCoercions = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? [] : void 0; + if (specs[t](value, Object.assign(Object.assign({}, state), { errors: subErrors, coercions: subCoercions, p: `${(_a = state === null || state === void 0 ? void 0 : state.p) !== null && _a !== void 0 ? _a : `.`}#${t + 1}` }))) { + matches.push([`#${t + 1}`, subCoercions]); + if (!exclusive) { + break; + } + } else { + errorBuffer === null || errorBuffer === void 0 ? void 0 : errorBuffer.push(subErrors[0]); + } + } + if (matches.length === 1) { + const [, subCoercions] = matches[0]; + if (typeof subCoercions !== `undefined`) + (_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions); + return true; + } + if (matches.length > 1) + pushError(state, `Expected to match exactly a single predicate (matched ${matches.join(`, `)})`); + else + (_c = state === null || state === void 0 ? void 0 : state.errors) === null || _c === void 0 ? void 0 : _c.push(...errorBuffer); + return false; + } + }); + TypeAssertionError = class extends Error { + constructor({ errors } = {}) { + let errorMessage = `Type mismatch`; + if (errors && errors.length > 0) { + errorMessage += ` +`; + for (const error of errors) { + errorMessage += ` +- ${error}`; + } + } + super(errorMessage); + } + }; + checks = { + missing: (keys, key) => keys.has(key), + undefined: (keys, key, value) => keys.has(key) && typeof value[key] !== `undefined`, + nil: (keys, key, value) => keys.has(key) && value[key] != null, + falsy: (keys, key, value) => keys.has(key) && !!value[key] + }; + (function(KeyRelationship2) { + KeyRelationship2["Forbids"] = "Forbids"; + KeyRelationship2["Requires"] = "Requires"; + })(KeyRelationship || (KeyRelationship = {})); + keyRelationships = { + [KeyRelationship.Forbids]: { + expect: false, + message: `forbids using` + }, + [KeyRelationship.Requires]: { + expect: true, + message: `requires using` + } + }; + } +}); + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/platform/node.js +var require_node = __commonJS({ + ".yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/platform/node.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tty2 = require("tty"); + function _interopDefaultLegacy(e) { + return e && typeof e === "object" && "default" in e ? e : { "default": e }; + } + var tty__default = /* @__PURE__ */ _interopDefaultLegacy(tty2); + function getDefaultColorDepth2() { + if (tty__default["default"] && `getColorDepth` in tty__default["default"].WriteStream.prototype) + return tty__default["default"].WriteStream.prototype.getColorDepth(); + if (process.env.FORCE_COLOR === `0`) + return 1; + if (process.env.FORCE_COLOR === `1`) + return 8; + if (typeof process.stdout !== `undefined` && process.stdout.isTTY) + return 8; + return 1; + } + var gContextStorage; + function getCaptureActivator2(context) { + let contextStorage = gContextStorage; + if (typeof contextStorage === `undefined`) { + if (context.stdout === process.stdout && context.stderr === process.stderr) + return null; + const { AsyncLocalStorage: LazyAsyncLocalStorage } = require("async_hooks"); + contextStorage = gContextStorage = new LazyAsyncLocalStorage(); + const origStdoutWrite = process.stdout._write; + process.stdout._write = function(chunk, encoding, cb) { + const context2 = contextStorage.getStore(); + if (typeof context2 === `undefined`) + return origStdoutWrite.call(this, chunk, encoding, cb); + return context2.stdout.write(chunk, encoding, cb); + }; + const origStderrWrite = process.stderr._write; + process.stderr._write = function(chunk, encoding, cb) { + const context2 = contextStorage.getStore(); + if (typeof context2 === `undefined`) + return origStderrWrite.call(this, chunk, encoding, cb); + return context2.stderr.write(chunk, encoding, cb); + }; + } + return (fn2) => { + return contextStorage.run(context, fn2); + }; + } + exports2.getCaptureActivator = getCaptureActivator2; + exports2.getDefaultColorDepth = getDefaultColorDepth2; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/debug.js"(exports2, module2) { + "use strict"; + var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug2; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/constants.js +var require_constants = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/constants.js"(exports2, module2) { + "use strict"; + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/re.js +var require_re = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/re.js"(exports2, module2) { + "use strict"; + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants(); + var debug2 = require_debug(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var safeRe = exports2.safeRe = []; + var src = exports2.src = []; + var safeSrc = exports2.safeSrc = []; + var t = exports2.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + } + return value; + }; + var createToken = (name2, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug2(name2, index, value); + t[name2] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/parse-options.js"(exports2, module2) { + "use strict"; + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/identifiers.js"(exports2, module2) { + "use strict"; + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + if (typeof a === "number" && typeof b === "number") { + return a === b ? 0 : a < b ? -1 : 1; + } + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/semver.js"(exports2, module2) { + "use strict"; + var debug2 = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer3 = class _SemVer { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof _SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; + } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); + } + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug2("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); + } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug2("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.major < other.major) { + return -1; + } + if (this.major > other.major) { + return 1; + } + if (this.minor < other.minor) { + return -1; + } + if (this.minor > other.minor) { + return 1; + } + if (this.patch < other.patch) { + return -1; + } + if (this.patch > other.patch) { + return 1; + } + return 0; + } + comparePre(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug2("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug2("build compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`); + } + } + } + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`); + } + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } + } + break; + } + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; + } + return this; + } + }; + module2.exports = SemVer3; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/compare.js"(exports2, module2) { + "use strict"; + var SemVer3 = require_semver(); + var compare = (a, b, loose) => new SemVer3(a, loose).compare(new SemVer3(b, loose)); + module2.exports = compare; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/rcompare.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/parse.js +var require_parse = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/parse.js"(exports2, module2) { + "use strict"; + var SemVer3 = require_semver(); + var parse4 = (version2, options, throwErrors = false) => { + if (version2 instanceof SemVer3) { + return version2; + } + try { + return new SemVer3(version2, options); + } catch (er) { + if (!throwErrors) { + return null; + } + throw er; + } + }; + module2.exports = parse4; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/valid.js"(exports2, module2) { + "use strict"; + var parse4 = require_parse(); + var valid = (version2, options) => { + const v = parse4(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/lrucache.js"(exports2, module2) { + "use strict"; + var LRUCache = class { + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) { + return void 0; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + const deleted = this.delete(key); + if (!deleted && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module2.exports = LRUCache; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/eq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/neq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/cmp.js"(exports2, module2) { + "use strict"; + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/comparator.js"(exports2, module2) { + "use strict"; + var ANY = Symbol("SemVer ANY"); + var Comparator = class _Comparator { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof _Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + comp = comp.trim().split(/\s+/).join(" "); + debug2("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug2("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer3(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug2("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer3(version2, this.options); + } catch (er) { + return false; + } + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof _Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range3(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range3(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { safeRe: re, t } = require_re(); + var cmp = require_cmp(); + var debug2 = require_debug(); + var SemVer3 = require_semver(); + var Range3 = require_range(); + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/range.js +var require_range = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/range.js"(exports2, module2) { + "use strict"; + var SPACE_CHARACTERS = /\s+/g; + var Range3 = class _Range { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof _Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new _Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached = cache2.get(memoKey); + if (cached) { + return cached; + } + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug2("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug2("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug2("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug2("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug2("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug2("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache2.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof _Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer3(version2, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range3; + var LRU = require_lrucache(); + var cache2 = new LRU(); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug2 = require_debug(); + var SemVer3 = require_semver(); + var { + safeRe: re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + comp = comp.replace(re[t.BUILD], ""); + debug2("comp", comp, options); + comp = replaceCarets(comp, options); + debug2("caret", comp); + comp = replaceTildes(comp, options); + debug2("tildes", comp); + comp = replaceXRanges(comp, options); + debug2("xrange", comp); + comp = replaceStars(comp, options); + debug2("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }; + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug2("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug2("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug2("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }; + var replaceCaret = (comp, options) => { + debug2("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug2("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug2("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug2("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug2("caret return", ret); + return ret; + }); + }; + var replaceXRanges = (comp, options) => { + debug2("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug2("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug2("xRange return", ret); + return ret; + }); + }; + var replaceStars = (comp, options) => { + debug2("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug2("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } + } + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug2(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/ranges/valid.js"(exports2, module2) { + "use strict"; + var Range3 = require_range(); + var validRange = (range, options) => { + try { + return new Range3(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// .yarn/cache/ms-npm-2.1.3-81ff3cfac1-d924b57e73.zip/node_modules/ms/index.js +var require_ms = __commonJS({ + ".yarn/cache/ms-npm-2.1.3-81ff3cfac1-d924b57e73.zip/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse4(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse4(str) { + str = String(str); + if (str.length > 100) { + return; + } + 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( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural2(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural2(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural2(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural2(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural2(ms, msAbs, n, name2) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : ""); + } + } +}); + +// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/common.js +var require_common = __commonJS({ + ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/common.js"(exports2, module2) { + function setup(env2) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env2).forEach((key) => { + createDebug[key] = env2[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug2(...args) { + if (!debug2.enabled) { + return; + } + const self2 = debug2; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match = formatter.call(self2, val); + args.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args); + } + debug2.namespace = namespace; + debug2.useColors = createDebug.useColors(); + debug2.color = createDebug.selectColor(namespace); + debug2.extend = extend; + debug2.destroy = createDebug.destroy; + Object.defineProperty(debug2, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug2); + } + return debug2; + } + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); + for (const ns of split) { + if (ns[0] === "-") { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { + if (template[templateIndex] === "*") { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; + } + } + while (templateIndex < template.length && template[templateIndex] === "*") { + templateIndex++; + } + return templateIndex === template.length; + } + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name2) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name2, skip)) { + return false; + } + } + for (const ns of createDebug.names) { + if (matchesTemplate(name2, ns)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/browser.js +var require_browser = __commonJS({ + ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + let r; + try { + r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// .yarn/cache/supports-color-npm-10.2.2-e43ac15f9f-fb28dd7e0c.zip/node_modules/supports-color/index.js +var supports_color_exports = {}; +__export(supports_color_exports, { + createSupportsColor: () => createSupportsColor, + default: () => supports_color_default +}); +function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +} +function envForceColor() { + if (!("FORCE_COLOR" in env)) { + return; + } + if (env.FORCE_COLOR === "true") { + return 1; + } + if (env.FORCE_COLOR === "false") { + return 0; + } + if (env.FORCE_COLOR.length === 0) { + return 1; + } + const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); + if (![0, 1, 2, 3].includes(level)) { + return; + } + return level; +} +function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} +function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { + const noFlagForceColor = envForceColor(); + if (noFlagForceColor !== void 0) { + flagForceColor = noFlagForceColor; + } + const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; + if (forceColor === 0) { + return 0; + } + if (sniffFlags) { + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + } + if ("TF_BUILD" in env && "AGENT_NAME" in env) { + return 1; + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; + } + if (import_node_process.default.platform === "win32") { + const osRelease = import_node_os.default.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) { + return 3; + } + if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if (env.TERM === "xterm-kitty") { + return 3; + } + if (env.TERM === "xterm-ghostty") { + return 3; + } + if (env.TERM === "wezterm") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": { + return version2 >= 3 ? 3 : 2; + } + case "Apple_Terminal": { + return 2; + } + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + return min; +} +function createSupportsColor(stream, options = {}) { + const level = _supportsColor(stream, { + streamIsTTY: stream && stream.isTTY, + ...options + }); + return translateLevel(level); +} +var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default; +var init_supports_color = __esm({ + ".yarn/cache/supports-color-npm-10.2.2-e43ac15f9f-fb28dd7e0c.zip/node_modules/supports-color/index.js"() { + import_node_process = __toESM(require("node:process"), 1); + import_node_os = __toESM(require("node:os"), 1); + import_node_tty = __toESM(require("node:tty"), 1); + ({ env } = import_node_process.default); + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + flagForceColor = 0; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + flagForceColor = 1; + } + supportsColor = { + stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }), + stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) }) + }; + supports_color_default = supportsColor; + } +}); + +// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/node.js +var require_node2 = __commonJS({ + ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/node.js"(exports2, module2) { + var tty2 = require("tty"); + var util = require("util"); + exports2.init = init; + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util.deprecate( + () => { + }, + "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." + ); + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports)); + if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) { + exports2.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + } + exports2.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd); + } + function formatArgs(args) { + const { namespace: name2, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name2} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name2 + " " + args[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return (/* @__PURE__ */ new Date()).toISOString() + " "; + } + function log2(...args) { + return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug2) { + debug2.inspectOpts = {}; + const keys = Object.keys(exports2.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + } +}); + +// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/index.js +var require_src = __commonJS({ + ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser(); + } else { + module2.exports = require_node2(); + } + } +}); + +// .yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-fe7dd8b1bd.zip/node_modules/proxy-from-env/index.js +var require_proxy_from_env = __commonJS({ + ".yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-fe7dd8b1bd.zip/node_modules/proxy-from-env/index.js"(exports2) { + "use strict"; + var parseUrl = require("url").parse; + var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 + }; + var stringEndsWith = String.prototype.endsWith || function(s) { + return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; + }; + function getProxyForUrl(url) { + var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== "string" || !hostname || typeof proto !== "string") { + return ""; + } + proto = proto.split(":", 1)[0]; + hostname = hostname.replace(/:\d*$/, ""); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ""; + } + var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy"); + if (proxy && proxy.indexOf("://") === -1) { + proxy = proto + "://" + proxy; + } + return proxy; + } + function shouldProxy(hostname, port) { + var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase(); + if (!NO_PROXY) { + return true; + } + if (NO_PROXY === "*") { + return false; + } + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; + } + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; + } + if (!/^[.*]/.test(parsedProxyHostname)) { + return hostname !== parsedProxyHostname; + } + if (parsedProxyHostname.charAt(0) === "*") { + parsedProxyHostname = parsedProxyHostname.slice(1); + } + return !stringEndsWith.call(hostname, parsedProxyHostname); + }); + } + function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; + } + exports2.getProxyForUrl = getProxyForUrl; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/errors.js +var require_errors = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/errors.js"(exports2, module2) { + "use strict"; + var kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + var kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + var kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + var kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + var kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + var kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + var kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + var kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + var kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + var kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + var kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + var kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + var kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + var kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + var kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + var kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + var kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + var kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + var kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code2, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code2 ? `HPE_${code2}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + var kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + var kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code2, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code2; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + var kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code2, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code2; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + var kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { cause, ...options ?? {} }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + module2.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/symbols.js +var require_symbols = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/symbols.js"(exports2, module2) { + module2.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/constants.js +var require_constants2 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/constants.js"(exports2, module2) { + "use strict"; + var headerNameLowerCasedRecord = {}; + var wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module2.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/tree.js +var require_tree = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/tree.js"(exports2, module2) { + "use strict"; + var { + wellknownHeaderNames, + headerNameLowerCasedRecord + } = require_constants2(); + var TstNode = class _TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) { + throw new TypeError("Unreachable"); + } + const code2 = this.code = key.charCodeAt(index); + if (code2 > 127) { + throw new TypeError("key must be ascii string"); + } + if (key.length !== ++index) { + this.middle = new _TstNode(key, value, index); + } else { + this.value = value; + } + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) { + throw new TypeError("Unreachable"); + } + let index = 0; + let node = this; + while (true) { + const code2 = key.charCodeAt(index); + if (code2 > 127) { + throw new TypeError("key must be ascii string"); + } + if (node.code === code2) { + if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) { + node = node.middle; + } else { + node.middle = new _TstNode(key, value, index); + break; + } + } else if (node.code < code2) { + if (node.left !== null) { + node = node.left; + } else { + node.left = new _TstNode(key, value, index); + break; + } + } else if (node.right !== null) { + node = node.right; + } else { + node.right = new _TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code2 = key[index]; + if (code2 <= 90 && code2 >= 65) { + code2 |= 32; + } + while (node !== null) { + if (code2 === node.code) { + if (keylength === ++index) { + return node; + } + node = node.middle; + break; + } + node = node.code < code2 ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) { + this.node = new TstNode(key, value, 0); + } else { + this.node.add(key, value); + } + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + var tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module2.exports = { + TernarySearchTree, + tree + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/util.js +var require_util = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/util.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols(); + var { IncomingMessage } = require("node:http"); + var stream = require("node:stream"); + var net = require("node:net"); + var { Blob: Blob2 } = require("node:buffer"); + var nodeUtil = require("node:util"); + var { stringify } = require("node:querystring"); + var { EventEmitter: EE3 } = require("node:events"); + var { InvalidArgumentError } = require_errors(); + var { headerNameLowerCasedRecord } = require_constants2(); + var { tree } = require_tree(); + var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert5(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream2(body)) { + if (bodyLength(body) === 0) { + body.on("data", function() { + assert5(false); + }); + } + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE3.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") { + return new BodyAsyncIterable(body); + } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { + return new BodyAsyncIterable(body); + } else { + return body; + } + } + function nop() { + } + function isStream2(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) { + return false; + } else if (object instanceof Blob2) { + return true; + } else if (typeof object !== "object") { + return false; + } else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".'); + } + const stringified = stringify(queryParams); + if (stringified) { + url += "?" + stringified; + } + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + return url; + } + if (!url || typeof url !== "object") { + throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + } + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) { + throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + } + if (url.path != null && typeof url.path !== "string") { + throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + } + if (url.pathname != null && typeof url.pathname !== "string") { + throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + } + if (url.hostname != null && typeof url.hostname !== "string") { + throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + } + if (url.origin != null && typeof url.origin !== "string") { + throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") { + origin = origin.slice(0, origin.length - 1); + } + if (path16 && path16[0] !== "/") { + path16 = `/${path16}`; + } + return new URL(`${origin}${path16}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) { + throw new InvalidArgumentError("invalid url"); + } + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx2 = host.indexOf("]"); + assert5(idx2 !== -1); + return host.substring(1, idx2); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) { + return null; + } + assert5(typeof host === "string"); + const servername = getHostname(host); + if (net.isIP(servername)) { + return ""; + } + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) { + return 0; + } else if (isStream2(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null; + } else if (isBuffer(body)) { + return body.byteLength; + } + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream2, err) { + if (stream2 == null || !isStream2(stream2) || isDestroyed(stream2)) { + return; + } + if (typeof stream2.destroy === "function") { + if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { + stream2.socket = null; + } + stream2.destroy(err); + } else if (err) { + queueMicrotask(() => { + stream2.emit("error", err); + }); + } + if (stream2.destroyed !== true) { + stream2[kDestroyed] = true; + } + } + var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") { + obj[key] = headersValue; + } else { + obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + } + if ("content-length" in obj && "content-disposition" in obj) { + obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + } + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) { + hasContentLength = true; + } else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { + contentDispositionIdx = n + 1; + } + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + } + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + if (typeof handler.onConnect !== "function") { + throw new InvalidArgumentError("invalid onConnect method"); + } + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { + throw new InvalidArgumentError("invalid onBodySent method"); + } + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") { + throw new InvalidArgumentError("invalid onUpgrade method"); + } + } else { + if (typeof handler.onHeaders !== "function") { + throw new InvalidArgumentError("invalid onHeaders method"); + } + if (typeof handler.onData !== "function") { + throw new InvalidArgumentError("invalid onData method"); + } + if (typeof handler.onComplete !== "function") { + throw new InvalidArgumentError("invalid onComplete method"); + } + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable2(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream( + { + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) { + controller.enqueue(new Uint8Array(buf)); + } + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + } + ); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + var hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + var hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val); + } + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: + return false; + default: + return c >= 33 && c <= 126; + } + } + function isValidHTTPToken(characters) { + if (characters.length === 0) { + return false; + } + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false; + } + } + return true; + } + var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { start: 0, end: null, size: null }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name2, listener) { + const listeners = obj[kListeners] ??= []; + listeners.push([name2, listener]); + obj.on(name2, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name2, listener] of obj[kListeners] ?? []) { + obj.removeListener(name2, listener); + } + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert5(request.aborted); + } catch (err2) { + client.emit("error", err2); + } + } + var kEnumerableProperty = /* @__PURE__ */ Object.create(null); + kEnumerableProperty.enumerable = true; + var normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + var normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module2.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable: isReadable2, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream: isStream2, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"], + wrapRequestBody + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/readable.js +var require_readable = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/readable.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var { Readable: Readable2 } = require("node:stream"); + var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + var util = require_util(); + var { ReadableStreamFrom } = require_util(); + var kConsume = Symbol("kConsume"); + var kReading = Symbol("kReading"); + var kBody = Symbol("kBody"); + var kAbort = Symbol("kAbort"); + var kContentType = Symbol("kContentType"); + var kContentLength = Symbol("kContentLength"); + var noop3 = () => { + }; + var BodyReadable = class extends Readable2 { + constructor({ + resume, + abort, + contentType = "", + contentLength, + highWaterMark = 64 * 1024 + // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (err) { + this[kAbort](); + } + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) { + setImmediate(() => { + callback(err); + }); + } else { + callback(err); + } + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") { + this[kReading] = true; + } + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") { + this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + } + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + // https://fetch.spec.whatwg.org/#dom-body-text + async text() { + return consume(this, "text"); + } + // https://fetch.spec.whatwg.org/#dom-body-json + async json() { + return consume(this, "json"); + } + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob() { + return consume(this, "blob"); + } + // https://fetch.spec.whatwg.org/#dom-body-bytes + async bytes() { + return consume(this, "bytes"); + } + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData() { + throw new NotSupportedError(); + } + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed() { + return util.isDisturbed(this); + } + // https://fetch.spec.whatwg.org/#dom-body-body + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert5(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { + throw new InvalidArgumentError("signal must be an AbortSignal"); + } + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) { + return null; + } + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) { + this.destroy(new AbortError()); + } + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) { + reject(signal.reason ?? new AbortError()); + } else { + resolve(null); + } + }).on("error", noop3).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) { + this.destroy(); + } + }).resume(); + }); + } + }; + function isLocked(self2) { + return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; + } + function isUnusable(self2) { + return util.isDisturbed(self2) || isLocked(self2); + } + async function consume(stream, type) { + assert5(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) { + stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(new TypeError("unusable")); + }); + } else { + reject(rState.errored ?? new TypeError("unusable")); + } + } else { + queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()); + } + }); + consumeStart(stream[kConsume]); + }); + } + }); + } + function consumeStart(consume2) { + if (consume2.body === null) { + return; + } + const { _readableState: state } = consume2.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) { + consumePush(consume2, state.buffer[n]); + } + } else { + for (const chunk of state.buffer) { + consumePush(consume2, chunk); + } + } + if (state.endEmitted) { + consumeEnd(this[kConsume]); + } else { + consume2.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + } + consume2.stream.resume(); + while (consume2.stream.read() != null) { + } + } + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) { + return ""; + } + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) { + return new Uint8Array(0); + } + if (chunks.length === 1) { + return new Uint8Array(chunks[0]); + } + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume2) { + const { type, body, resolve, stream, length } = consume2; + try { + if (type === "text") { + resolve(chunksDecode(body, length)); + } else if (type === "json") { + resolve(JSON.parse(chunksDecode(body, length))); + } else if (type === "arrayBuffer") { + resolve(chunksConcat(body, length).buffer); + } else if (type === "blob") { + resolve(new Blob(body, { type: stream[kContentType] })); + } else if (type === "bytes") { + resolve(chunksConcat(body, length)); + } + consumeFinish(consume2); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume2, chunk) { + consume2.length += chunk.length; + consume2.body.push(chunk); + } + function consumeFinish(consume2, err) { + if (consume2.body === null) { + return; + } + if (err) { + consume2.reject(err); + } else { + consume2.resolve(); + } + consume2.type = null; + consume2.stream = null; + consume2.resolve = null; + consume2.reject = null; + consume2.length = 0; + consume2.body = null; + } + module2.exports = { Readable: BodyReadable, chunksDecode }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/util.js +var require_util2 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/util.js"(exports2, module2) { + var assert5 = require("node:assert"); + var { + ResponseStatusCodeError + } = require_errors(); + var { chunksDecode } = require_readable(); + var CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert5(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) { + payload = JSON.parse(chunksDecode(chunks, length)); + } else if (isContentTypeText(contentType)) { + payload = chunksDecode(chunks, length); + } + } catch { + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + var isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + var isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module2.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-request.js +var require_api_request = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-request.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var { Readable: Readable2 } = require_readable(); + var { InvalidArgumentError, RequestAbortedError } = require_errors(); + var util = require_util(); + var { getResolveErrorBodyCallback } = require_util2(); + var { AsyncResource } = require("node:async_hooks"); + var RequestHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { + throw new InvalidArgumentError("invalid highWaterMark"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on("error", util.nop), err); + } + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); + } + if (this.signal) { + if (this.signal.aborted) { + this.reason = this.signal.reason ?? new RequestAbortedError(); + } else { + this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) { + util.destroy(this.res.on("error", util.nop), this.reason); + } else if (this.abort) { + this.abort(this.reason); + } + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + } + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert5(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable2({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) { + res.on("close", this.removeAbortListener); + } + this.callback = null; + this.res = res; + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope( + getResolveErrorBodyCallback, + null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ); + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + } + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = request; + module2.exports.RequestHandler = RequestHandler; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { + var { addAbortListener } = require_util(); + var { RequestAbortedError } = require_errors(); + var kListener = Symbol("kListener"); + var kSignal = Symbol("kSignal"); + function abort(self2) { + if (self2.abort) { + self2.abort(self2[kSignal]?.reason); + } else { + self2.reason = self2[kSignal]?.reason ?? new RequestAbortedError(); + } + removeSignal(self2); + } + function addSignal(self2, signal) { + self2.reason = null; + self2[kSignal] = null; + self2[kListener] = null; + if (!signal) { + return; + } + if (signal.aborted) { + abort(self2); + return; + } + self2[kSignal] = signal; + self2[kListener] = () => { + abort(self2); + }; + addAbortListener(self2[kSignal], self2[kListener]); + } + function removeSignal(self2) { + if (!self2[kSignal]) { + return; + } + if ("removeEventListener" in self2[kSignal]) { + self2[kSignal].removeEventListener("abort", self2[kListener]); + } else { + self2[kSignal].removeListener("abort", self2[kListener]); + } + self2[kSignal] = null; + self2[kListener] = null; + } + module2.exports = { + addSignal, + removeSignal + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-stream.js +var require_api_stream = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-stream.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var { finished, PassThrough } = require("node:stream"); + var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + var util = require_util(); + var { getResolveErrorBodyCallback } = require_util2(); + var { AsyncResource } = require("node:async_hooks"); + var { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("invalid factory"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on("error", util.nop), err); + } + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); + } + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert5(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + res = new PassThrough(); + this.callback = null; + this.runInAsyncScope( + getResolveErrorBodyCallback, + null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ); + } else { + if (factory === null) { + return; + } + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { + throw new InvalidReturnValueError("expected Writable"); + } + finished(res, { readable: false }, (err) => { + const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; + this.res = null; + if (err || !res2.readable) { + util.destroy(res2, err); + } + this.callback = null; + this.runInAsyncScope(callback2, null, err || null, { opaque: opaque2, trailers }); + if (err) { + abort(); + } + }); + } + res.on("drain", resume); + this.res = res; + const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain; + return needDrain !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) { + return; + } + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = stream; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { + "use strict"; + var { + Readable: Readable2, + Duplex, + PassThrough + } = require("node:stream"); + var { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError + } = require_errors(); + var util = require_util(); + var { AsyncResource } = require("node:async_hooks"); + var { addSignal, removeSignal } = require_abort_signal(); + var assert5 = require("node:assert"); + var kResume = Symbol("resume"); + var PipelineRequest = class extends Readable2 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable2 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof handler !== "function") { + throw new InvalidArgumentError("invalid handler"); + } + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) { + body.resume(); + } + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback(); + } else { + req[kResume] = callback; + } + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (abort && err) { + abort(); + } + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert5(!res, "pipeline cannot be retried"); + assert5(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ statusCode, headers }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") { + throw new InvalidReturnValueError("expected Readable"); + } + body.on("data", (chunk) => { + const { ret, body: body2 } = this; + if (!ret.push(chunk) && body2.pause) { + body2.pause(); + } + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) { + util.destroy(ret, new RequestAbortedError()); + } + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module2.exports = pipeline; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-upgrade.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError, SocketError } = require_errors(); + var { AsyncResource } = require("node:async_hooks"); + var util = require_util(); + var { addSignal, removeSignal } = require_abort_signal(); + var assert5 = require("node:assert"); + var UpgradeHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert5(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert5(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = upgrade; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-connect.js +var require_api_connect = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-connect.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var { AsyncResource } = require("node:async_hooks"); + var { InvalidArgumentError, SocketError } = require_errors(); + var util = require_util(); + var { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert5(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) { + headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + } + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ ...opts, method: "CONNECT" }, connectHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = connect; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/index.js +var require_api = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/index.js"(exports2, module2) { + "use strict"; + module2.exports.request = require_api_request(); + module2.exports.stream = require_api_stream(); + module2.exports.pipeline = require_api_pipeline(); + module2.exports.upgrade = require_api_upgrade(); + module2.exports.connect = require_api_connect(); + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) { + "use strict"; + var EventEmitter2 = require("node:events"); + var Dispatcher = class extends EventEmitter2 { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) { + continue; + } + if (typeof interceptor !== "function") { + throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + } + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { + throw new TypeError("invalid interceptor"); + } + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module2.exports = Dispatcher; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) { + "use strict"; + var Dispatcher = require_dispatcher(); + var { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError + } = require_errors(); + var { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols(); + var kOnDestroyed = Symbol("onDestroyed"); + var kOnClosed = Symbol("onClosed"); + var kInterceptedDispatch = Symbol("Intercepted Dispatch"); + var DispatcherBase = class extends Dispatcher { + constructor() { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) { + const interceptor = this[kInterceptors][i]; + if (typeof interceptor !== "function") { + throw new InvalidArgumentError("interceptor must be an function"); + } + } + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) { + return new Promise((resolve, reject) => { + this.destroy(err, (err2, data) => { + return err2 ? ( + /* istanbul ignore next: should never error */ + reject(err2) + ) : resolve(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; + } + if (!err) { + err = new ClientDestroyedError(); + } + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) { + dispatch = this[kInterceptors][i](dispatch); + } + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + try { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object."); + } + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError(); + } + if (this[kClosed]) { + throw new ClientClosedError(); + } + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } + handler.onError(err); + return false; + } + } + }; + module2.exports = DispatcherBase; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports2, module2) { + "use strict"; + var kSize = 2048; + var kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) + return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module2.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) { + this.head = this.head.next = new FixedCircularBuffer(); + } + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + this.tail = tail.next; + } + return next; + } + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-stats.js"(exports2, module2) { + var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols(); + var kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module2.exports = PoolStats; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-base.js"(exports2, module2) { + "use strict"; + var DispatcherBase = require_dispatcher_base(); + var FixedQueue = require_fixed_queue(); + var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols(); + var PoolStats = require_pool_stats(); + var kClients = Symbol("clients"); + var kNeedDrain = Symbol("needDrain"); + var kQueue = Symbol("queue"); + var kClosedResolve = Symbol("closed resolve"); + var kOnDrain = Symbol("onDrain"); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kGetDispatcher = Symbol("get dispatcher"); + var kAddClient = Symbol("add client"); + var kRemoveClient = Symbol("remove client"); + var kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor() { + super(); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) { + break; + } + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + } + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) { + ret += pending; + } + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) { + ret += running; + } + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) { + ret += size; + } + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) { + await Promise.all(this[kClients].map((c) => c.close())); + } else { + await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) { + break; + } + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ opts, handler }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) { + queueMicrotask(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]); + } + }); + } + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module2.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/diagnostics.js"(exports2, module2) { + "use strict"; + var diagnosticsChannel = require("node:diagnostics_channel"); + var util = require("node:util"); + var undiciDebugLog = util.debuglog("undici"); + var fetchDebuglog = util.debuglog("fetch"); + var websocketDebuglog = util.debuglog("websocket"); + var isClientSet = false; + var channels = { + // Client + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + // Request + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + // WebSocket + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debuglog( + "connecting to %s using %s%s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version2 + ); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debuglog( + "connected to %s using %s%s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version2 + ); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { + connectParams: { version: version2, protocol, port, host }, + error + } = evt; + debuglog( + "connection to %s using %s%s errored - %s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version2, + error.message + ); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { + request: { method, path: path16, origin } + } = evt; + debuglog("sending request to %s %s/%s", method, origin, path16); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { + request: { method, path: path16, origin }, + response: { statusCode } + } = evt; + debuglog( + "received response to %s %s/%s - HTTP %d", + method, + origin, + path16, + statusCode + ); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { + request: { method, path: path16, origin } + } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path16); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { + request: { method, path: path16, origin }, + error + } = evt; + debuglog( + "request to %s %s/%s errored - %s", + method, + origin, + path16, + error.message + ); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debuglog( + "connecting to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version2 + ); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debuglog( + "connected to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version2 + ); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { + connectParams: { version: version2, protocol, port, host }, + error + } = evt; + debuglog( + "connection to %s%s using %s%s errored - %s", + host, + port ? `:${port}` : "", + protocol, + version2, + error.message + ); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { + request: { method, path: path16, origin } + } = evt; + debuglog("sending request to %s %s/%s", method, origin, path16); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { + address: { address, port } + } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code: code2, reason } = evt; + websocketDebuglog( + "closed connection to %s - %s %s", + websocket.url, + code2, + reason + ); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module2.exports = { + channels + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/request.js +var require_request = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/request.js"(exports2, module2) { + "use strict"; + var { + InvalidArgumentError, + NotSupportedError + } = require_errors(); + var assert5 = require("node:assert"); + var { + isValidHTTPToken, + isValidHeaderValue, + isStream: isStream2, + destroy, + isBuffer, + isFormDataLike, + isIterable, + isBlobLike, + buildURL, + validateHandler, + getServerName, + normalizedMethodRecords + } = require_util(); + var { channels } = require_diagnostics(); + var { headerNameLowerCasedRecord } = require_constants2(); + var invalidPathRegex = /[^\u0021-\u00ff]/; + var kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { + path: path16, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue, + servername + }, handler) { + if (typeof path16 !== "string") { + throw new InvalidArgumentError("path must be a string"); + } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + } else if (invalidPathRegex.test(path16)) { + throw new InvalidArgumentError("invalid request path"); + } + if (typeof method !== "string") { + throw new InvalidArgumentError("method must be a string"); + } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) { + throw new InvalidArgumentError("invalid request method"); + } + if (upgrade && typeof upgrade !== "string") { + throw new InvalidArgumentError("upgrade must be a string"); + } + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("invalid headersTimeout"); + } + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("invalid bodyTimeout"); + } + if (reset != null && typeof reset !== "boolean") { + throw new InvalidArgumentError("invalid reset"); + } + if (expectContinue != null && typeof expectContinue !== "boolean") { + throw new InvalidArgumentError("invalid expectContinue"); + } + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) { + this.body = null; + } else if (isStream2(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) { + this.abort(err); + } else { + this.error = err; + } + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) { + this.body = body.byteLength ? body : null; + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null; + } else if (typeof body === "string") { + this.body = body.length ? Buffer.from(body) : null; + } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { + this.body = body; + } else { + throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + } + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path16, query) : path16; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError("headers array must be even"); + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]); + } + } else if (headers && typeof headers === "object") { + if (headers[Symbol.iterator]) { + for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) { + throw new InvalidArgumentError("headers must be in key-value pair format"); + } + processHeader(this, header[0], header[1]); + } + } else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) { + processHeader(this, keys[i], headers[keys[i]]); + } + } + } else if (headers != null) { + throw new InvalidArgumentError("headers must be an object or an array"); + } + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }); + } + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }); + } + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + } + onConnect(abort) { + assert5(!this.aborted); + assert5(!this.completed); + if (this.error) { + abort(this.error); + } else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert5(!this.aborted); + assert5(!this.completed); + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); + } + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert5(!this.aborted); + assert5(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert5(!this.aborted); + assert5(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert5(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }); + } + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }); + } + if (this.aborted) { + return; + } + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && (typeof val === "object" && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === void 0) { + return; + } + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) { + throw new InvalidArgumentError("invalid header key"); + } + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) { + if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + arr.push(val[i]); + } else if (val[i] === null) { + arr.push(""); + } else if (typeof val[i] === "object") { + throw new InvalidArgumentError(`invalid ${key} header`); + } else { + arr.push(`${val[i]}`); + } + } + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + } else if (val === null) { + val = ""; + } else { + val = `${val}`; + } + if (request.host === null && headerName === "host") { + if (typeof val !== "string") { + throw new InvalidArgumentError("invalid host header"); + } + request.host = val; + } else if (request.contentLength === null && headerName === "content-length") { + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError("invalid content-length header"); + } + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { + throw new InvalidArgumentError(`invalid ${headerName} header`); + } else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") { + throw new InvalidArgumentError("invalid connection header"); + } + if (value === "close") { + request.reset = true; + } + } else if (headerName === "expect") { + throw new NotSupportedError("expect header not supported"); + } else { + request.headers.push(key, val); + } + } + module2.exports = Request; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/util/timers.js +var require_timers = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/util/timers.js"(exports2, module2) { + "use strict"; + var fastNow = 0; + var RESOLUTION_MS = 1e3; + var TICK_MS = (RESOLUTION_MS >> 1) - 1; + var fastNowTimeout; + var kFastTimer = Symbol("kFastTimer"); + var fastTimers = []; + var NOT_IN_LIST = -2; + var TO_BE_CLEARED = -1; + var PENDING2 = 0; + var ACTIVE = 1; + function onTick() { + fastNow += TICK_MS; + let idx = 0; + let len = fastTimers.length; + while (idx < len) { + const timer = fastTimers[idx]; + if (timer._state === PENDING2) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) { + fastTimers[idx] = fastTimers[len]; + } + } else { + ++idx; + } + } + fastTimers.length = len; + if (fastTimers.length !== 0) { + refreshTimeout(); + } + } + function refreshTimeout() { + if (fastNowTimeout) { + fastNowTimeout.refresh(); + } else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) { + fastNowTimeout.unref(); + } + } + } + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) { + fastTimers.push(this); + } + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout(); + } + this._state = PENDING2; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + module2.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) { + timeout.clear(); + } else { + clearTimeout(timeout); + } + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/connect.js +var require_connect = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/connect.js"(exports2, module2) { + "use strict"; + var net = require("node:net"); + var assert5 = require("node:assert"); + var util = require_util(); + var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + var timers = require_timers(); + function noop3() { + } + var tls; + var SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { + SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return; + } + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) { + this._sessionCache.delete(key); + } + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; + } + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + } else { + SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; + } + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + } + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + } + const options = { path: socketPath, ...opts }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) { + tls = require("node:tls"); + } + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert5(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + // upgrade socket connection + port, + host: hostname + }); + socket.on("session", function(session2) { + sessionCache.set(sessionKey, session2); + }); + } else { + assert5(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net.connect({ + highWaterMark: 64 * 1024, + // Same as nodejs fs streams. + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + var setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop3; + } + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop3; + } + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + function onConnectTimeout(socket, opts) { + if (socket == null) { + return; + } + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { + message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + } else { + message += ` (attempted address: ${opts.hostname}:${opts.port},`; + } + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module2.exports = buildConnector; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/utils.js +var require_utils = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") { + res[key] = value; + } + }); + return res; + } + exports2.enumToMap = enumToMap; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/constants.js +var require_constants3 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; + var utils_1 = require_utils(); + var ERROR2; + (function(ERROR3) { + ERROR3[ERROR3["OK"] = 0] = "OK"; + ERROR3[ERROR3["INTERNAL"] = 1] = "INTERNAL"; + ERROR3[ERROR3["STRICT"] = 2] = "STRICT"; + ERROR3[ERROR3["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR3[ERROR3["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR3[ERROR3["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR3[ERROR3["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR3[ERROR3["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR3[ERROR3["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR3[ERROR3["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR3[ERROR3["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR3[ERROR3["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR3[ERROR3["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR3[ERROR3["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR3[ERROR3["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR3[ERROR3["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR3[ERROR3["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR3[ERROR3["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR3[ERROR3["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR3[ERROR3["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR3[ERROR3["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR3[ERROR3["PAUSED"] = 21] = "PAUSED"; + ERROR3[ERROR3["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR3[ERROR3["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR3[ERROR3["USER"] = 24] = "USER"; + })(ERROR2 = exports2.ERROR || (exports2.ERROR = {})); + var TYPE; + (function(TYPE2) { + TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; + TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; + TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; + })(TYPE = exports2.TYPE || (exports2.TYPE = {})); + var FLAGS; + (function(FLAGS2) { + FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; + FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; + FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; + FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(FLAGS = exports2.FLAGS || (exports2.FLAGS = {})); + var LENIENT_FLAGS; + (function(LENIENT_FLAGS2) { + LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(LENIENT_FLAGS = exports2.LENIENT_FLAGS || (exports2.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS2) { + METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; + METHODS2[METHODS2["GET"] = 1] = "GET"; + METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; + METHODS2[METHODS2["POST"] = 3] = "POST"; + METHODS2[METHODS2["PUT"] = 4] = "PUT"; + METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; + METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; + METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; + METHODS2[METHODS2["COPY"] = 8] = "COPY"; + METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; + METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; + METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; + METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; + METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; + METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; + METHODS2[METHODS2["BIND"] = 16] = "BIND"; + METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; + METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; + METHODS2[METHODS2["ACL"] = 19] = "ACL"; + METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; + METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; + METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; + METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; + METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; + METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS2[METHODS2["LINK"] = 31] = "LINK"; + METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; + METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; + METHODS2[METHODS2["PRI"] = 34] = "PRI"; + METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; + METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; + METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; + METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; + METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; + METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports2.METHODS || (exports2.METHODS = {})); + exports2.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + METHODS.SOURCE + ]; + exports2.METHODS_ICE = [ + METHODS.SOURCE + ]; + exports2.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + // For AirPlay + METHODS.GET, + METHODS.POST + ]; + exports2.METHOD_MAP = utils_1.enumToMap(METHODS); + exports2.H_METHOD_MAP = {}; + Object.keys(exports2.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) { + exports2.H_METHOD_MAP[key] = exports2.METHOD_MAP[key]; + } + }); + var FINISH; + (function(FINISH2) { + FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; + FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; + })(FINISH = exports2.FINISH || (exports2.FINISH = {})); + exports2.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports2.ALPHA.push(String.fromCharCode(i)); + exports2.ALPHA.push(String.fromCharCode(i + 32)); + } + exports2.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports2.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports2.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); + exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; + exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); + exports2.STRICT_URL_CHAR = [ + "!", + '"', + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports2.ALPHANUM); + exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) { + exports2.URL_CHAR.push(i); + } + exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); + exports2.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports2.ALPHANUM); + exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); + exports2.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports2.HEADER_CHARS.push(i); + } + } + exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); + exports2.MAJOR = exports2.NUM_MAP; + exports2.MINOR = exports2.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE2) { + HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports2.HEADER_STATE || (exports2.HEADER_STATE = {})); + exports2.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer3 } = require("node:buffer"); + module2.exports = Buffer3.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1h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hAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAA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QQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJ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EAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer3 } = require("node:buffer"); + module2.exports = Buffer3.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25f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LACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNG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0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSN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AAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/constants.js +var require_constants4 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/constants.js"(exports2, module2) { + "use strict"; + var corsSafeListedMethods = ( + /** @type {const} */ + ["GET", "HEAD", "POST"] + ); + var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + var nullBodyStatus = ( + /** @type {const} */ + [101, 204, 205, 304] + ); + var redirectStatus = ( + /** @type {const} */ + [301, 302, 303, 307, 308] + ); + var redirectStatusSet = new Set(redirectStatus); + var badPorts = ( + /** @type {const} */ + [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ] + ); + var badPortsSet = new Set(badPorts); + var referrerPolicy = ( + /** @type {const} */ + [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ] + ); + var referrerPolicySet = new Set(referrerPolicy); + var requestRedirect = ( + /** @type {const} */ + ["follow", "manual", "error"] + ); + var safeMethods = ( + /** @type {const} */ + ["GET", "HEAD", "OPTIONS", "TRACE"] + ); + var safeMethodsSet = new Set(safeMethods); + var requestMode = ( + /** @type {const} */ + ["navigate", "same-origin", "no-cors", "cors"] + ); + var requestCredentials = ( + /** @type {const} */ + ["omit", "same-origin", "include"] + ); + var requestCache = ( + /** @type {const} */ + [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ] + ); + var requestBodyHeader = ( + /** @type {const} */ + [ + "content-encoding", + "content-language", + "content-location", + "content-type", + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + "content-length" + ] + ); + var requestDuplex = ( + /** @type {const} */ + [ + "half" + ] + ); + var forbiddenMethods = ( + /** @type {const} */ + ["CONNECT", "TRACE", "TRACK"] + ); + var forbiddenMethodsSet = new Set(forbiddenMethods); + var subresource = ( + /** @type {const} */ + [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ] + ); + var subresourceSet = new Set(subresource); + module2.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/global.js +var require_global = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/global.js"(exports2, module2) { + "use strict"; + var globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { + throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + } + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module2.exports = { + getGlobalOrigin, + setGlobalOrigin + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var encoder = new TextEncoder(); + var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + function dataURLProcessor(dataURL) { + assert5(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast( + ",", + input, + position + ); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) { + return "failure"; + } + position.position++; + const encodedBody = input.slice(mimeTypeLength + 1); + let body = stringPercentDecode(encodedBody); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") { + return "failure"; + } + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) { + mimeType = "text/plain" + mimeType; + } + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") { + mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + } + return { mimeType: mimeTypeRecord, body }; + } + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) { + return url.href; + } + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) { + return serialized.slice(0, -1); + } + return serialized; + } + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + function stringPercentDecode(input) { + const bytes = encoder.encode(input); + return percentDecode(bytes); + } + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + function hexByteToNumber(byte) { + return ( + // 0-9 + byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55 + ); + } + function percentDecode(input) { + const length = input.length; + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) { + output[j++] = byte; + } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) { + output[j++] = 37; + } else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast( + "/", + input, + position + ); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return "failure"; + } + if (position.position > input.length) { + return "failure"; + } + position.position++; + let subtype = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return "failure"; + } + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + (char) => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ); + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ";" && char !== "=", + input, + position + ); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") { + continue; + } + position.position++; + } + if (position.position > input.length) { + break; + } + let parameterValue = null; + if (input[position.position] === '"') { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast( + ";", + input, + position + ); + } else { + parameterValue = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) { + continue; + } + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { + mimeType.parameters.set(parameterName, parameterValue); + } + } + return mimeType; + } + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + } + } + } + if (dataLength % 4 === 1) { + return "failure"; + } + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { + return "failure"; + } + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert5(input[position.position] === '"'); + position.position++; + while (true) { + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== "\\", + input, + position + ); + if (position.position >= input.length) { + break; + } + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert5(quoteOrBackslash === '"'); + break; + } + } + if (extractValue) { + return value; + } + return input.slice(positionStart, position.position); + } + function serializeAMimeType(mimeType) { + assert5(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name2, value] of parameters.entries()) { + serialization += ";"; + serialization += name2; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = '"' + value; + value += '"'; + } + serialization += value; + } + return serialization; + } + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) { + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + } + if (trailing) { + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + } + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + function isomorphicDecode(input) { + const length = input.length; + if ((2 << 15) - 1 > length) { + return String.fromCharCode.apply(null, input); + } + let result = ""; + let i = 0; + let addition = (2 << 15) - 1; + while (i < length) { + if (i + addition > length) { + addition = length - i; + } + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": + return "text/javascript"; + case "application/json": + case "text/json": + return "application/json"; + case "image/svg+xml": + return "image/svg+xml"; + case "text/xml": + case "application/xml": + return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) { + return "application/json"; + } + if (mimeType.subtype.endsWith("+xml")) { + return "application/xml"; + } + return ""; + } + module2.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/webidl.js"(exports2, module2) { + "use strict"; + var { types, inspect } = require("node:util"); + var { markAsUncloneable } = require("node:worker_threads"); + var { toUSVString } = require_util(); + var webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural2 = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural2}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else { + if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + } + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": + return "Undefined"; + case "boolean": + return "Boolean"; + case "string": + return "String"; + case "symbol": + return "Symbol"; + case "number": + return "Number"; + case "bigint": + return "BigInt"; + case "function": + case "object": { + if (V === null) { + return "Null"; + } + return "Object"; + } + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => { + }); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") { + lowerBound = 0; + } else { + lowerBound = Math.pow(-2, 53) + 1; + } + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) { + x = 0; + } + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + } + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + } + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x); + } else { + x = Math.ceil(x); + } + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + return 0; + } + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength); + } + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) { + return -1 * r; + } + return r; + }; + webidl.util.Stringify = function(V) { + const type = webidl.util.Type(V); + switch (type) { + case "Symbol": + return `Symbol(${V.description})`; + case "Object": + return inspect(V); + case "String": + return `"${V}"`; + default: + return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + } + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + } + while (true) { + const { done, value } = method.next(); + if (done) { + break; + } + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + } + const result = {}; + if (!types.isProxy(O)) { + const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys2) { + const typedKey = keyConverter(key, prefix, argument); + const typedValue = valueConverter(O[key], prefix, argument); + result[typedKey] = typedValue; + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) { + const desc2 = Reflect.getOwnPropertyDescriptor(O, key); + if (desc2?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + const typedValue = valueConverter(O[key], prefix, argument); + result[typedKey] = typedValue; + } + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + } + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") { + return dict; + } else if (type !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + } + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) { + value ??= defaultValue(); + } + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) { + throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + } + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) { + return V; + } + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) { + return ""; + } + if (typeof V === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + } + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + ); + } + } + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + const x = Boolean(V); + return x; + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + return x; + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.resizable || V.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name2, opts) { + if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name2} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.DataView = function(V, prefix, name2, opts) { + if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: prefix, + message: `${name2} is not a DataView.` + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name2, opts) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, prefix, name2, { ...opts, allowShared: false }); + } + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor, prefix, name2, { ...opts, allowShared: false }); + } + if (types.isDataView(V)) { + return webidl.converters.DataView(V, prefix, name2, { ...opts, allowShared: false }); + } + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name2} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.ByteString + ); + webidl.converters["sequence>"] = webidl.sequenceConverter( + webidl.converters["sequence"] + ); + webidl.converters["record"] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString + ); + module2.exports = { + webidl + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/util.js +var require_util3 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/util.js"(exports2, module2) { + "use strict"; + var { Transform } = require("node:stream"); + var zlib = require("node:zlib"); + var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants4(); + var { getGlobalOrigin } = require_global(); + var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + var { performance } = require("node:perf_hooks"); + var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util(); + var assert5 = require("node:assert"); + var { isUint8Array } = require("node:util/types"); + var { webidl } = require_webidl(); + var supportedHashes = []; + var crypto; + try { + crypto = require("node:crypto"); + const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch { + } + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) { + return null; + } + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) { + location = normalizeBinaryStringToUtf8(location); + } + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) { + location.hash = requestFragment; + } + return location; + } + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code2 = url.charCodeAt(i); + if (code2 > 126 || // Non-US-ASCII + DEL + code2 < 32) { + return false; + } + } + return true; + } + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return "blocked"; + } + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || // HTAB + c >= 32 && c <= 126 || // SP / VCHAR + c >= 128 && c <= 255)) { + return false; + } + } + return true; + } + var isValidHeaderName = isValidHTTPToken; + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) { + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + } + if (policy !== "") { + request.referrerPolicy = policy; + } + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) { + return; + } + if (request.responseTainting === "cors" || request.mode === "websocket") { + request.headersList.append("origin", serializedOrigin, true); + } else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { + serializedOrigin = null; + } + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null; + } + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { + return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + } + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { + referrerPolicy: "strict-origin-when-cross-origin" + }; + } + function clonePolicyContainer(policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert5(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") { + return "no-referrer"; + } + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) { + referrerSource = request.referrer; + } + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin; + } + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": + return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": + return referrerURL; + case "same-origin": + return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": + return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL; + } + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; + } + case "strict-origin": + // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + case "no-referrer-when-downgrade": + // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + default: + return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + function stripURLForReferrer(url, originOnly) { + assert5(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + return "no-referrer"; + } + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) { + return false; + } + if (url.href === "about:blank" || url.href === "about:srcdoc") { + return true; + } + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { + return true; + } + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.")) || originAsURL.hostname.endsWith(".localhost")) { + return true; + } + return false; + } + } + function bytesMatch(bytes, metadataList) { + if (crypto === void 0) { + return true; + } + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") { + return true; + } + if (parsedMetadata.length === 0) { + return true; + } + const strongest = getStrongestMetadata(parsedMetadata); + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") { + if (actualValue[actualValue.length - 2] === "=") { + actualValue = actualValue.slice(0, -2); + } else { + actualValue = actualValue.slice(0, -1); + } + } + if (compareBase64Mixed(actualValue, expectedValue)) { + return true; + } + } + return false; + } + var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + function parseMetadata(metadata) { + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { + continue; + } + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) { + result.push(parsedToken.groups); + } + } + if (empty === true) { + return "no metadata"; + } + return result; + } + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") { + return algorithm; + } + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") { + continue; + } else if (metadata.algo[3] === "3") { + algorithm = "sha384"; + } + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) { + return metadataList; + } + let pos2 = 0; + for (let i = 0; i < metadataList.length; ++i) { + if (metadataList[i].algo === algorithm) { + metadataList[pos2++] = metadataList[i]; + } + } + metadataList.length = pos2; + return metadataList; + } + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) { + return false; + } + for (let i = 0; i < actualValue.length; ++i) { + if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { + continue; + } + return false; + } + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { + } + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") { + return true; + } + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true; + } + return false; + } + function createDeferredPromise() { + let res; + let rej; + const promise = new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }); + return { promise, resolve: res, reject: rej }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) { + throw new TypeError("Value is not JSON serializable"); + } + assert5(typeof result === "string"); + return result; + } + var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + function createIterator(name2, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name2} Iterator.` + ); + } + const index = this.#index; + const values = this.#target[kInternalIterator]; + const len = values.length; + if (index >= len) { + return { + value: void 0, + done: true + }; + } + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name2} Iterator` + }, + next: { writable: true, enumerable: true, configurable: true } + }); + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + function iteratorMixin(name2, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name2, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name2}.forEach`); + if (typeof callbackfn !== "function") { + throw new TypeError( + `Failed to execute 'forEach' on '${name2}': parameter 1 is not of type 'Function'.` + ); + } + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) { + callbackfn.call(thisArg, value, key, this); + } + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) { + throw err; + } + } + } + var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + function isomorphicEncode(input) { + assert5(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) { + return Buffer.concat(bytes, byteLength); + } + if (!isUint8Array(chunk)) { + throw new TypeError("Received non-Uint8Array chunk"); + } + bytes.push(chunk); + byteLength += chunk.length; + } + } + function urlIsLocal(url) { + assert5("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + function urlIsHttpHttpsScheme(url) { + assert5("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) { + return "failure"; + } + const position = { position: 5 }; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + if (data.charCodeAt(position.position) !== 61) { + return "failure"; + } + position.position++; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + const rangeStart = collectASequenceOfCodePoints( + (char) => { + const code2 = char.charCodeAt(0); + return code2 >= 48 && code2 <= 57; + }, + data, + position + ); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + if (data.charCodeAt(position.position) !== 45) { + return "failure"; + } + position.position++; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + const rangeEnd = collectASequenceOfCodePoints( + (char) => { + const code2 = char.charCodeAt(0); + return code2 >= 48 && code2 <= 57; + }, + data, + position + ); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) { + return "failure"; + } + if (rangeEndValue === null && rangeStartValue === null) { + return "failure"; + } + if (rangeStartValue > rangeEndValue) { + return "failure"; + } + return { rangeStartValue, rangeEndValue }; + } + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate(this.#zlibOptions) : zlib.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) { + return "failure"; + } + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") { + continue; + } + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) { + charset = mimeType.parameters.get("charset"); + } + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) { + mimeType.parameters.set("charset", charset); + } + } + if (mimeType == null) { + return "failure"; + } + return mimeType; + } + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== ",", + input, + position + ); + if (position.position < input.length) { + if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString( + input, + position + ); + if (position.position < input.length) { + continue; + } + } else { + assert5(input.charCodeAt(position.position) === 44); + position.position++; + } + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + function getDecodeSplit(name2, list2) { + const value = list2.get(name2, true); + if (value === null) { + return null; + } + return gettingDecodingSplitting(value); + } + var textDecoder = new TextDecoder(); + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { + return ""; + } + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { + buffer = buffer.subarray(3); + } + const output = textDecoder.decode(buffer); + return output; + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + var environmentSettingsObject = new EnvironmentSettingsObject(); + module2.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols2 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/symbols.js"(exports2, module2) { + "use strict"; + module2.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/file.js +var require_file = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/file.js"(exports2, module2) { + "use strict"; + var { Blob: Blob2, File } = require("node:buffer"); + var { kState } = require_symbols2(); + var { webidl } = require_webidl(); + var FileLike = class _FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, _FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, _FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module2.exports = { FileLike, isFileLike }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata.js"(exports2, module2) { + "use strict"; + var { isBlobLike, iteratorMixin } = require_util3(); + var { kState } = require_symbols2(); + var { kEnumerableProperty } = require_util(); + var { FileLike, isFileLike } = require_file(); + var { webidl } = require_webidl(); + var { File: NativeFile } = require("node:buffer"); + var nodeUtil = require("node:util"); + var File = globalThis.File ?? NativeFile; + var FormData = class _FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) { + throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + } + this[kState] = []; + } + append(name2, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ); + } + name2 = webidl.converters.USVString(name2, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name2, value, filename); + this[kState].push(entry); + } + delete(name2) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name2 = webidl.converters.USVString(name2, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name2); + } + get(name2) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name2 = webidl.converters.USVString(name2, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name2); + if (idx === -1) { + return null; + } + return this[kState][idx].value; + } + getAll(name2) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name2 = webidl.converters.USVString(name2, prefix, "name"); + return this[kState].filter((entry) => entry.name === name2).map((entry) => entry.value); + } + has(name2) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name2 = webidl.converters.USVString(name2, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name2) !== -1; + } + set(name2, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ); + } + name2 = webidl.converters.USVString(name2, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name2, value, filename); + const idx = this[kState].findIndex((entry2) => entry2.name === name2); + if (idx !== -1) { + this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name2) + ]; + } else { + this[kState].push(entry); + } + } + [nodeUtil.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) { + if (Array.isArray(a[b.name])) { + a[b.name].push(b.value); + } else { + a[b.name] = [a[b.name], b.value]; + } + } else { + a[b.name] = b.value; + } + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + function makeEntry(name2, value, filename) { + if (typeof value === "string") { + } else { + if (!isFileLike(value)) { + value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + } + if (filename !== void 0) { + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { name: name2, value }; + } + module2.exports = { FormData, makeEntry }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports2, module2) { + "use strict"; + var { isUSVString, bufferToLowerCasedHeaderName } = require_util(); + var { utf8DecodeBytes } = require_util3(); + var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + var { isFileLike } = require_file(); + var { makeEntry } = require_formdata(); + var assert5 = require("node:assert"); + var { File: NodeFile } = require("node:buffer"); + var File = globalThis.File ?? NodeFile; + var formDataNameBuffer = Buffer.from('form-data; name="'); + var filenameBuffer = Buffer.from("; filename"); + var dd = Buffer.from("--"); + var ddcrlf = Buffer.from("--\r\n"); + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) { + if ((chars.charCodeAt(i) & ~127) !== 0) { + return false; + } + } + return true; + } + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) { + return false; + } + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { + return false; + } + } + return true; + } + function multipartFormDataParser(input, mimeType) { + assert5(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) { + return "failure"; + } + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) { + position.position += 2; + } + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) { + trailing -= 2; + } + if (trailing !== input.length) { + input = input.subarray(0, trailing); + } + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { + position.position += boundary.length; + } else { + return "failure"; + } + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) { + return entryList; + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + return "failure"; + } + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") { + return "failure"; + } + let { name: name2, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) { + return "failure"; + } + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") { + body = Buffer.from(body.toString(), "base64"); + } + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + return "failure"; + } else { + position.position += 2; + } + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) { + contentType = ""; + } + value = new File([body], filename, { type: contentType }); + } else { + value = utf8DecodeBytes(Buffer.from(body)); + } + assert5(isUSVString(name2)); + assert5(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name2, value, filename)); + } + } + function parseMultipartFormDataHeaders(input, position) { + let name2 = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name2 === null) { + return "failure"; + } + return { name: name2, filename, contentType, encoding }; + } + let headerName = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 58, + input, + position + ); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { + return "failure"; + } + if (input[position.position] !== 58) { + return "failure"; + } + position.position++; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": { + name2 = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) { + return "failure"; + } + position.position += 17; + name2 = parseMultipartFormDataName(input, position); + if (name2 === null) { + return "failure"; + } + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) { + return "failure"; + } + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) { + return "failure"; + } + } + break; + } + case "content-type": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: { + collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + } + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) { + return "failure"; + } else { + position.position += 2; + } + } + } + function parseMultipartFormDataName(input, position) { + assert5(input[position.position - 1] === 34); + let name2 = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 34, + input, + position + ); + if (input[position.position] !== 34) { + return null; + } else { + position.position++; + } + name2 = new TextDecoder().decode(name2).replace(/%0A/ig, "\n").replace(/%0D/ig, "\r").replace(/%22/g, '"'); + return name2; + } + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) { + ++start; + } + return input.subarray(position.position, position.position = start); + } + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) { + while (lead < buf.length && predicate(buf[lead])) lead++; + } + if (trailing) { + while (trail > 0 && predicate(buf[trail])) trail--; + } + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) { + return false; + } + for (let i = 0; i < start.length; i++) { + if (start[i] !== buffer[position.position + i]) { + return false; + } + } + return true; + } + module2.exports = { + multipartFormDataParser, + validateBoundary + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/body.js +var require_body = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/body.js"(exports2, module2) { + "use strict"; + var util = require_util(); + var { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody, + extractMimeType, + utf8DecodeBytes + } = require_util3(); + var { FormData } = require_formdata(); + var { kState } = require_symbols2(); + var { webidl } = require_webidl(); + var { Blob: Blob2 } = require("node:buffer"); + var assert5 = require("node:assert"); + var { isErrored, isDisturbed } = require("node:stream"); + var { isArrayBuffer } = require("node:util/types"); + var { serializeAMimeType } = require_data_url(); + var { multipartFormDataParser } = require_formdata_parser(); + var random; + try { + const crypto = require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + var textEncoder = new TextEncoder(); + function noop3() { + } + var hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + var streamRegistry; + if (hasFinalizationRegistry) { + streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { + stream.cancel("Response object has been garbage collected").catch(noop3); + } + }); + } + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) { + stream = object; + } else if (isBlobLike(object)) { + stream = object.stream(); + } else { + stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) { + controller.enqueue(buffer); + } + queueMicrotask(() => readableStreamClose(controller)); + }, + start() { + }, + type: "bytes" + }); + } + assert5(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) { + source = new Uint8Array(object.slice()); + } else if (ArrayBuffer.isView(object)) { + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + } else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r +Content-Disposition: form-data`; + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name2, value] of object) { + if (typeof value === "string") { + const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name2))}"\r +\r +${normalizeLinefeeds(value)}\r +`); + blobParts.push(chunk2); + length += chunk2.byteLength; + } else { + const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name2))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r +\r +`); + blobParts.push(chunk2, value, rn); + if (typeof value.size === "number") { + length += chunk2.byteLength + value.size + rn.byteLength; + } else { + hasUnknownSizeValue = true; + } + } + } + const chunk = textEncoder.encode(`--${boundary}--\r +`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) { + length = null; + } + source = object; + action = async function* () { + for (const part of blobParts) { + if (part.stream) { + yield* part.stream(); + } else { + yield part; + } + } + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) { + type = object.type; + } + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) { + throw new TypeError("keepalive"); + } + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + "Response body object should not be disturbed or locked" + ); + } + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) { + length = Buffer.byteLength(source); + } + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) { + controller.enqueue(buffer); + } + } + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + const body = { stream, source, length }; + return [body, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + assert5(!util.isDisturbed(object), "The body has already been consumed."); + assert5(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) { + throw new DOMException("The operation was aborted.", "AbortError"); + } + } + function bodyMixinMethods(instance) { + const methods = { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) { + mimeType = ""; + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType); + } + return new Blob2([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) { + switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") { + throw new TypeError("Failed to parse body as FormData."); + } + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name2, value2] of entries) { + fd.append(name2, value2); + } + return fd; + } + } + } + throw new TypeError( + 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' + ); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + return methods; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) { + throw new TypeError("Body is unusable: Body has already been read"); + } + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + function bodyMimeType(requestOrResponse) { + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") { + return null; + } + return mimeType; + } + module2.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var util = require_util(); + var { channels } = require_diagnostics(); + var timers = require_timers(); + var { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError + } = require_errors(); + var { + kUrl, + kReset, + kClient, + kParser, + kBlocking, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kMaxRequests, + kCounter, + kMaxResponseSize, + kOnError, + kResume, + kHTTPContext + } = require_symbols(); + var constants2 = require_constants3(); + var EMPTY_BUF = Buffer.alloc(0); + var FastBuffer = Buffer[Symbol.species]; + var addListener = util.addListener; + var removeAllListeners = util.removeAllListeners; + var extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ + wasm_on_url: (p, at, len) => { + return 0; + }, + wasm_on_status: (p, at, len) => { + assert5(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert5(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert5(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert5(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert5(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert5(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert5(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + /* eslint-enable camelcase */ + } + }); + } + var llhttpInstance = null; + var llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + var currentParser = null; + var currentBufferRef = null; + var currentBufferSize = 0; + var currentBufferPtr = null; + var USE_NATIVE_TIMER = 0; + var USE_FAST_TIMER = 1; + var TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; + var TIMEOUT_BODY = 4 | USE_FAST_TIMER; + var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; + var Parser2 = class { + constructor(client, socket, { exports: exports3 }) { + assert5(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports3; + this.ptr = this.llhttp.llhttp_alloc(constants2.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) { + if (type & USE_FAST_TIMER) { + this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + } else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + } + this.timeoutValue = delay; + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) { + return; + } + assert5(this.ptr != null); + assert5(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert5(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) { + break; + } + this.execute(chunk); + } + } + execute(data) { + assert5(this.ptr != null); + assert5(currentParser == null); + assert5(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr); + } + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants2.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data.slice(offset)); + } else if (ret === constants2.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants2.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants2.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert5(this.ptr != null); + assert5(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { + return -1; + } + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) { + this.headers.push(buf); + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + } + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + } + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") { + this.keepAlive += buf.toString(); + } else if (headerName === "connection") { + this.connection += buf.toString(); + } + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { + this.contentLength += buf.toString(); + } + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()); + } + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert5(upgrade); + assert5(client[kSocket] === socket); + assert5(!socket.destroyed); + assert5(!this.paused); + assert5((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert5(request); + assert5(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { + return -1; + } + assert5(!this.upgrade); + assert5(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert5(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. + request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + if (request.method === "CONNECT") { + assert5(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert5(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert5((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ); + if (timeout <= 0) { + socket[kReset] = true; + } else { + client[kKeepAliveTimeoutValue] = timeout; + } + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } + } else { + socket[kReset] = true; + } + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) { + return -1; + } + if (request.method === "HEAD") { + return 1; + } + if (statusCode < 200) { + return 1; + } + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants2.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + assert5(request); + assert5(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + assert5(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) { + return constants2.ERROR.PAUSED; + } + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1; + } + if (upgrade) { + return; + } + assert5(statusCode >= 100); + assert5((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert5(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) { + return; + } + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert5(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants2.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants2.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants2.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) { + setImmediate(() => client[kResume]()); + } else { + client[kResume](); + } + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert5(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) { + util.destroy(socket, new BodyTimeoutError()); + } + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert5(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser2(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert5(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) { + parser.readMore(); + } + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client2 = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + } + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client2[kSocket] = null; + client2[kHTTPContext] = null; + if (client2.destroyed) { + assert5(client2[kPending] === 0); + const requests = client2[kQueue].splice(client2[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client2, request, err); + } + } else if (client2[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client2[kQueue][client2[kRunningIdx]]; + client2[kQueue][client2[kRunningIdx]++] = null; + util.errorRequest(client2, request, err); + } + client2[kPendingIdx] = client2[kRunningIdx]; + assert5(client2[kRunning] === 0); + client2.emit("disconnect", client2[kUrl], [client2], err); + client2[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return true; + } + if (request) { + if (client[kRunning] > 0 && !request.idempotent) { + return true; + } + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { + return true; + } + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { + return true; + } + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path: path16, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) { + extractBody = require_body().extractBody; + } + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) { + headers.push("content-type", contentType); + } + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) { + headers.push("content-type", body.type); + } + if (body && typeof body.read === "function") { + body.read(0); + } + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) { + contentLength = request.contentLength; + } + if (contentLength === 0 && !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) { + return; + } + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) { + return false; + } + if (method === "HEAD") { + socket[kReset] = true; + } + if (upgrade || method === "CONNECT") { + socket[kReset] = true; + } + if (reset != null) { + socket[kReset] = reset; + } + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true; + } + if (blocking) { + socket[kBlocking] = true; + } + let header = `${method} ${path16} HTTP/1.1\r +`; + if (typeof host === "string") { + header += `host: ${host}\r +`; + } else { + header += client[kHostHeader]; + } + if (upgrade) { + header += `connection: upgrade\r +upgrade: ${upgrade}\r +`; + } else if (client[kPipelining] && !socket[kReset]) { + header += "connection: keep-alive\r\n"; + } else { + header += "connection: close\r\n"; + } + if (Array.isArray(headers)) { + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + header += `${key}: ${val[i]}\r +`; + } + } else { + header += `${key}: ${val}\r +`; + } + } + } + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }); + } + if (!body || bodyLength === 0) { + writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + } else if (util.isBuffer(body)) { + writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + } else { + writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + } + } else if (util.isStream(body)) { + writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else if (util.isIterable(body)) { + writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + } else { + assert5(false); + } + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert5(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); + const onData = function(chunk) { + if (finished) { + return; + } + try { + if (!writer.write(chunk) && this.pause) { + this.pause(); + } + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) { + return; + } + if (body.resume) { + body.resume(); + } + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) { + return; + } + finished = true; + assert5(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) { + try { + writer.end(); + } catch (er) { + err = er; + } + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { + util.destroy(body, err); + } else { + util.destroy(body); + } + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) { + body.resume(); + } + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) { + setImmediate(() => onFinished(body.errored)); + } else if (body.endEmitted ?? body.readableEnded) { + setImmediate(() => onFinished(null)); + } + if (body.closeEmitted ?? body.closed) { + setImmediate(onClose); + } + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + assert5(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r +`, "latin1"); + } + } else if (util.isBuffer(body)) { + assert5(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert5(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert5(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert5(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve; + } + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + if (!writer.write(chunk)) { + await waitForDrain(); + } + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) { + throw socket[kError]; + } + if (socket.destroyed) { + return false; + } + const len = Buffer.byteLength(chunk); + if (!len) { + return true; + } + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r +`, "latin1"); + } else { + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + } + } + if (contentLength === null) { + socket.write(`\r +${len.toString(16)}\r +`, "latin1"); + } + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) { + throw socket[kError]; + } + if (socket.destroyed) { + return; + } + if (bytesWritten === 0) { + if (expectsPayload) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + socket.write(`${header}\r +`, "latin1"); + } + } else if (contentLength === null) { + socket.write("\r\n0\r\n\r\n", "latin1"); + } + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } else { + process.emitWarning(new RequestContentLengthMismatchError()); + } + } + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert5(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module2.exports = connectH1; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var { pipeline } = require("node:stream"); + var util = require_util(); + var { + RequestContentLengthMismatchError, + RequestAbortedError, + SocketError, + InformationalError + } = require_errors(); + var { + kUrl, + kReset, + kClient, + kRunning, + kPending, + kQueue, + kPendingIdx, + kRunningIdx, + kError, + kSocket, + kStrictContentLength, + kOnError, + kMaxConcurrentStreams, + kHTTP2Session, + kResume, + kSize, + kHTTPContext + } = require_symbols(); + var kOpenStreams = Symbol("open streams"); + var extractBody; + var h2ExperimentalWarned = false; + var http2; + try { + http2 = require("node:http2"); + } catch { + http2 = { constants: {} }; + } + var { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } + } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name2, value] of Object.entries(headers)) { + if (Array.isArray(value)) { + for (const subvalue of value) { + result.push(Buffer.from(name2), Buffer.from(subvalue)); + } + } else { + result.push(Buffer.from(name2), Buffer.from(value)); + } + } + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { + code: "UNDICI-H2" + }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client2 } = this; + const { [kSocket]: socket2 } = client2; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket2)); + client2[kHTTP2Session] = null; + if (client2.destroyed) { + assert5(client2[kPending] === 0); + const requests = client2[kQueue].splice(client2[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client2, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert5(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert5(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) { + if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + } + function onHttp2SessionError(err) { + assert5(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code2, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code2}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + function onHTTP2GoAway(code2) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code2}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert5(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (headers[key]) { + headers[key] += `,${val[i]}`; + } else { + headers[key] = val[i]; + } + } + } else { + headers[key] = val; + } + } + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) { + return; + } + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) { + util.destroy(stream, err); + } + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) { + return false; + } + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { endStream: false, signal }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else { + stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + } + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") { + body.read(0); + } + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) { + contentLength = request.contentLength; + } + if (contentLength === 0 || !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert5(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { endStream: shouldEndStream, signal }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers2) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { + stream.pause(); + } + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) { + stream.pause(); + } + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) { + request.onComplete([]); + } + if (session[kOpenStreams] === 0) { + session.unref(); + } + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); + } + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code2) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code2}`)); + }); + return true; + function writeBodyH2() { + if (!body || contentLength === 0) { + writeBuffer( + abort, + stream, + null, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else if (util.isBuffer(body)) { + writeBuffer( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable( + abort, + stream, + body.stream(), + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else { + writeBlob( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } + } else if (util.isStream(body)) { + writeStream( + abort, + client[kSocket], + expectsPayload, + stream, + body, + client, + request, + contentLength + ); + } else if (util.isIterable(body)) { + writeIterable( + abort, + stream, + body, + client, + request, + client[kSocket], + contentLength, + expectsPayload + ); + } else { + assert5(false); + } + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert5(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) { + socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert5(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } + } + ); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert5(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert5(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert5(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve; + } + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) { + await waitForDrain(); + } + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module2.exports = connectH2; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/handler/redirect-handler.js"(exports2, module2) { + "use strict"; + var util = require_util(); + var { kBodyUsed } = require_symbols(); + var assert5 = require("node:assert"); + var { InvalidArgumentError } = require_errors(); + var EE3 = require("node:events"); + var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; + var kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert5(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { ...opts, maxRedirections: 0 }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body.on("data", function() { + assert5(false); + }); + } + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE3.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) { + this.request.abort(new Error("max redirects")); + } + this.redirectionLimitReached = true; + this.abort(new Error("max redirects")); + return; + } + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)); + } + if (!this.location) { + return this.handler.onHeaders(statusCode, headers, resume, statusText); + } + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path16 = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path16; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) { + } else { + return this.handler.onData(chunk); + } + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else { + this.handler.onComplete(trailers); + } + } + onBodySent(chunk) { + if (this.handler.onBodySent) { + this.handler.onBodySent(chunk); + } + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) { + return null; + } + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") { + return headers[i + 1]; + } + } + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util.headerNameToString(header) === "host"; + } + if (removeContent && util.headerNameToString(header).startsWith("content-")) { + return true; + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name2 = util.headerNameToString(header); + return name2 === "authorization" || name2 === "cookie" || name2 === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { + ret.push(headers[i], headers[i + 1]); + } + } + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, headers[key]); + } + } + } else { + assert5(headers == null, "headers must be an object or an array"); + } + return ret; + } + module2.exports = RedirectHandler; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/interceptor/redirect-interceptor.js"(exports2, module2) { + "use strict"; + var RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) { + return dispatch(opts, handler); + } + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { ...opts, maxRedirections: 0 }; + return dispatch(opts, redirectHandler); + }; + }; + } + module2.exports = createRedirectInterceptor; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client.js +var require_client = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client.js"(exports2, module2) { + "use strict"; + var assert5 = require("node:assert"); + var net = require("node:net"); + var http = require("node:http"); + var util = require_util(); + var { channels } = require_diagnostics(); + var Request = require_request(); + var DispatcherBase = require_dispatcher_base(); + var { + InvalidArgumentError, + InformationalError, + ClientDestroyedError + } = require_errors(); + var buildConnector = require_connect(); + var { + kUrl, + kServerName, + kClient, + kBusy, + kConnect, + kResuming, + kRunning, + kPending, + kSize, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kOnError, + kHTTPContext, + kMaxConcurrentStreams, + kResume + } = require_symbols(); + var connectH1 = require_client_h1(); + var connectH2 = require_client_h2(); + var deprecatedInterceptorWarned = false; + var kClosedResolve = Symbol("kClosedResolve"); + var noop3 = () => { + }; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { + interceptors, + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect: connect2, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + maxConcurrentStreams, + allowH2 + } = {}) { + super(); + if (keepAlive !== void 0) { + throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + } + if (socketTimeout !== void 0) { + throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + } + if (requestTimeout !== void 0) { + throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + } + if (idleTimeout !== void 0) { + throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + } + if (maxKeepAliveTimeout !== void 0) { + throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + } + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { + throw new InvalidArgumentError("invalid maxHeaderSize"); + } + if (socketPath != null && typeof socketPath !== "string") { + throw new InvalidArgumentError("invalid socketPath"); + } + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError("invalid connectTimeout"); + } + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveTimeout"); + } + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + } + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + } + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + } + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + } + if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + } + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError("localAddress must be valid string IP address"); + } + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError("maxResponseSize must be a positive number"); + } + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { + throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + } + if (allowH2 != null && typeof allowH2 !== "boolean") { + throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + } + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + } + if (typeof connect2 !== "function") { + connect2 = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect2 + }); + } + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { + code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" + }); + } + } else { + this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + } + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect2; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r +`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean( + this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0 + ); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const origin = opts.origin || this[kUrl].origin; + const request = new Request(origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) { + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else { + this[kResume](true); + } + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2; + } + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) { + this[kClosedResolve] = resolve; + } else { + resolve(null); + } + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else { + queueMicrotask(callback); + } + this[kResume](); + }); + } + }; + var createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert5(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert5(client[kSize] === 0); + } + } + async function connect(client) { + assert5(!client[kConnecting]); + assert5(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert5(idx !== -1); + const ip = hostname.substring(1, idx); + assert5(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + } + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket2) => { + if (err) { + reject(err); + } else { + resolve(socket2); + } + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop3), new ClientDestroyedError()); + return; + } + assert5(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop3); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + } + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) { + return; + } + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + } + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert5(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else { + onError(client, err); + } + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) { + return; + } + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert5(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) { + client[kHTTPContext].resume(); + } + if (client[kBusy]) { + client[kNeedDrain] = 2; + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else { + emitDrain(client); + } + continue; + } + if (client[kPending] === 0) { + return; + } + if (client[kRunning] >= (getPipelining(client) || 1)) { + return; + } + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) { + return; + } + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) { + return; + } + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) { + return; + } + if (client[kHTTPContext].busy(request)) { + return; + } + if (!request.aborted && client[kHTTPContext].write(request)) { + client[kPendingIdx]++; + } else { + client[kQueue].splice(client[kPendingIdx], 1); + } + } + } + module2.exports = Client; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool.js +var require_pool = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool.js"(exports2, module2) { + "use strict"; + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher + } = require_pool_base(); + var Client = require_client(); + var { + InvalidArgumentError + } = require_errors(); + var util = require_util(); + var { kUrl, kInterceptors } = require_symbols(); + var buildConnector = require_connect(); + var kOptions = Symbol("options"); + var kConnections = Symbol("connections"); + var kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + ...options + } = {}) { + super(); + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError("invalid connections"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect != null && typeof connect !== "function" && typeof connect !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (typeof connect !== "function") { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect + }); + } + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin2, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) { + if (!client[kNeedDrain]) { + return client; + } + } + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module2.exports = Pool; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/agent.js +var require_agent = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/agent.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError } = require_errors(); + var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); + var DispatcherBase = require_dispatcher_base(); + var Pool = require_pool(); + var Client = require_client(); + var util = require_util(); + var createRedirectInterceptor = require_redirect_interceptor(); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kMaxRedirections = Symbol("maxRedirections"); + var kOnDrain = Symbol("onDrain"); + var kFactory = Symbol("factory"); + var kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + super(); + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect != null && typeof connect !== "function" && typeof connect !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + if (connect && typeof connect !== "function") { + connect = { ...connect }; + } + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { ...util.deepClone(options), connect }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) { + ret += client[kRunning]; + } + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { + key = String(opts.origin); + } else { + throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + } + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) { + closePromises.push(client.close()); + } + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) { + destroyPromises.push(client.destroy(err)); + } + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module2.exports = Agent; + } +}); + +// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = __commonJS({ + ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports2, module2) { + "use strict"; + var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); + var { URL: URL2 } = require("node:url"); + var Agent = require_agent(); + var Pool = require_pool(); + var DispatcherBase = require_dispatcher_base(); + var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + var buildConnector = require_connect(); + var Client = require_client(); + var kAgent = Symbol("proxy agent"); + var kClient = Symbol("proxy client"); + var kProxyHeaders = Symbol("proxy headers"); + var kRequestTls = Symbol("request tls settings"); + var kProxyTls = Symbol("proxy tls settings"); + var kConnectEndpoint = Symbol("connect endpoint function"); + var kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var noop3 = () => { + }; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) { + return new Client(origin, opts); + } + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) { + throw new InvalidArgumentError("Proxy URL is mandatory"); + } + this[kProxyHeaders] = headers; + if (factory) { + this.#client = factory(proxyUrl, { connect }); + } else { + this.#client = new Client(proxyUrl, { connect }); + } + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") { + handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + } + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { + origin, + path: path16 = "/", + headers = {} + } = opts; + opts.path = origin + path16; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL2(origin); + headers.host = host; + } + opts.headers = { ...this[kProxyHeaders], ...headers }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent2 = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) { + throw new InvalidArgumentError("Proxy uri is mandatory"); + } + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") { + throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + } + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { uri: href, protocol }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) { + throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + } else if (opts.auth) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + } else if (opts.token) { + this[kProxyHeaders]["proxy-authorization"] = opts.token; + } else if (username && password) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + } + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin2, options) => { + const { protocol: protocol2 } = new URL2(origin2); + if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") { + return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + } + return agentFactory(origin2, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts2, callback) => { + let requestedPath = opts2.host; + if (!opts2.port) { + requestedPath += `:${defaultProtocolPort(opts2.protocol)}`; + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts2.signal, + headers: { + ...this[kProxyHeaders], + host: opts2.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop3).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts2.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) { + servername = this[kRequestTls].servername; + } else { + servername = opts2.servername; + } + this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + callback(new SecureProxyConnectionError(err)); + } else { + callback(err); + } + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL2(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch( + { + ...opts, + headers + }, + handler + ); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") { + return new URL2(opts); + } else if (opts instanceof URL2) { + return opts; + } else { + return new URL2(opts.uri); + } + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + function buildHeaders(headers) { + if (Array.isArray(headers)) { + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1]; + } + return headersPair; + } + return headers; + } + function throwIfProxyAuthIsSent(headers) { + const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); + if (existProxyAuth) { + throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + } + module2.exports = ProxyAgent2; + } +}); + +// .yarn/cache/minipass-npm-7.1.2-3a5327d36d-b0fd20bb9f.zip/node_modules/minipass/dist/esm/index.js +var import_node_events, import_node_stream, import_node_string_decoder, proc, isStream, isReadable, isWritable, EOF, MAYBE_EMIT_END, EMITTED_END, EMITTING_END, EMITTED_ERROR, CLOSED, READ, FLUSH, FLUSHCHUNK, ENCODING, DECODER, FLOWING, PAUSED, RESUME, BUFFER, PIPES, BUFFERLENGTH, BUFFERPUSH, BUFFERSHIFT, OBJECTMODE, DESTROYED, ERROR, EMITDATA, EMITEND, EMITEND2, ASYNC, ABORT, ABORTED, SIGNAL, DATALISTENERS, DISCARDED, defer, nodefer, isEndish, isArrayBufferLike, isArrayBufferView, Pipe, PipeProxyErrors, isObjectModeOptions, isEncodingOptions, Minipass; +var init_esm = __esm({ + ".yarn/cache/minipass-npm-7.1.2-3a5327d36d-b0fd20bb9f.zip/node_modules/minipass/dist/esm/index.js"() { + import_node_events = require("node:events"); + import_node_stream = __toESM(require("node:stream"), 1); + import_node_string_decoder = require("node:string_decoder"); + proc = typeof process === "object" && process ? process : { + stdout: null, + stderr: null + }; + isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof import_node_stream.default || isReadable(s) || isWritable(s)); + isReadable = (s) => !!s && typeof s === "object" && s instanceof import_node_events.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws + s.pipe !== import_node_stream.default.Writable.prototype.pipe; + isWritable = (s) => !!s && typeof s === "object" && s instanceof import_node_events.EventEmitter && typeof s.write === "function" && typeof s.end === "function"; + EOF = Symbol("EOF"); + MAYBE_EMIT_END = Symbol("maybeEmitEnd"); + EMITTED_END = Symbol("emittedEnd"); + EMITTING_END = Symbol("emittingEnd"); + EMITTED_ERROR = Symbol("emittedError"); + CLOSED = Symbol("closed"); + READ = Symbol("read"); + FLUSH = Symbol("flush"); + FLUSHCHUNK = Symbol("flushChunk"); + ENCODING = Symbol("encoding"); + DECODER = Symbol("decoder"); + FLOWING = Symbol("flowing"); + PAUSED = Symbol("paused"); + RESUME = Symbol("resume"); + BUFFER = Symbol("buffer"); + PIPES = Symbol("pipes"); + BUFFERLENGTH = Symbol("bufferLength"); + BUFFERPUSH = Symbol("bufferPush"); + BUFFERSHIFT = Symbol("bufferShift"); + OBJECTMODE = Symbol("objectMode"); + DESTROYED = Symbol("destroyed"); + ERROR = Symbol("error"); + EMITDATA = Symbol("emitData"); + EMITEND = Symbol("emitEnd"); + EMITEND2 = Symbol("emitEnd2"); + ASYNC = Symbol("async"); + ABORT = Symbol("abort"); + ABORTED = Symbol("aborted"); + SIGNAL = Symbol("signal"); + DATALISTENERS = Symbol("dataListeners"); + DISCARDED = Symbol("discarded"); + defer = (fn2) => Promise.resolve().then(fn2); + nodefer = (fn2) => fn2(); + isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish"; + isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0; + isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b); + Pipe = class { + src; + dest; + opts; + ondrain; + constructor(src, dest, opts) { + this.src = src; + this.dest = dest; + this.opts = opts; + this.ondrain = () => src[RESUME](); + this.dest.on("drain", this.ondrain); + } + unpipe() { + this.dest.removeListener("drain", this.ondrain); + } + // only here for the prototype + /* c8 ignore start */ + proxyErrors(_er) { + } + /* c8 ignore stop */ + end() { + this.unpipe(); + if (this.opts.end) + this.dest.end(); + } + }; + PipeProxyErrors = class extends Pipe { + unpipe() { + this.src.removeListener("error", this.proxyErrors); + super.unpipe(); + } + constructor(src, dest, opts) { + super(src, dest, opts); + this.proxyErrors = (er) => dest.emit("error", er); + src.on("error", this.proxyErrors); + } + }; + isObjectModeOptions = (o) => !!o.objectMode; + isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer"; + Minipass = class extends import_node_events.EventEmitter { + [FLOWING] = false; + [PAUSED] = false; + [PIPES] = []; + [BUFFER] = []; + [OBJECTMODE]; + [ENCODING]; + [ASYNC]; + [DECODER]; + [EOF] = false; + [EMITTED_END] = false; + [EMITTING_END] = false; + [CLOSED] = false; + [EMITTED_ERROR] = null; + [BUFFERLENGTH] = 0; + [DESTROYED] = false; + [SIGNAL]; + [ABORTED] = false; + [DATALISTENERS] = 0; + [DISCARDED] = false; + /** + * true if the stream can be written + */ + writable = true; + /** + * true if the stream can be read + */ + readable = true; + /** + * If `RType` is Buffer, then options do not need to be provided. + * Otherwise, an options object must be provided to specify either + * {@link Minipass.SharedOptions.objectMode} or + * {@link Minipass.SharedOptions.encoding}, as appropriate. + */ + constructor(...args) { + const options = args[0] || {}; + super(); + if (options.objectMode && typeof options.encoding === "string") { + throw new TypeError("Encoding and objectMode may not be used together"); + } + if (isObjectModeOptions(options)) { + this[OBJECTMODE] = true; + this[ENCODING] = null; + } else if (isEncodingOptions(options)) { + this[ENCODING] = options.encoding; + this[OBJECTMODE] = false; + } else { + this[OBJECTMODE] = false; + this[ENCODING] = null; + } + this[ASYNC] = !!options.async; + this[DECODER] = this[ENCODING] ? new import_node_string_decoder.StringDecoder(this[ENCODING]) : null; + if (options && options.debugExposeBuffer === true) { + Object.defineProperty(this, "buffer", { get: () => this[BUFFER] }); + } + if (options && options.debugExposePipes === true) { + Object.defineProperty(this, "pipes", { get: () => this[PIPES] }); + } + const { signal } = options; + if (signal) { + this[SIGNAL] = signal; + if (signal.aborted) { + this[ABORT](); + } else { + signal.addEventListener("abort", () => this[ABORT]()); + } + } + } + /** + * The amount of data stored in the buffer waiting to be read. + * + * For Buffer strings, this will be the total byte length. + * For string encoding streams, this will be the string character length, + * according to JavaScript's `string.length` logic. + * For objectMode streams, this is a count of the items waiting to be + * emitted. + */ + get bufferLength() { + return this[BUFFERLENGTH]; + } + /** + * The `BufferEncoding` currently in use, or `null` + */ + get encoding() { + return this[ENCODING]; + } + /** + * @deprecated - This is a read only property + */ + set encoding(_enc) { + throw new Error("Encoding must be set at instantiation time"); + } + /** + * @deprecated - Encoding may only be set at instantiation time + */ + setEncoding(_enc) { + throw new Error("Encoding must be set at instantiation time"); + } + /** + * True if this is an objectMode stream + */ + get objectMode() { + return this[OBJECTMODE]; + } + /** + * @deprecated - This is a read-only property + */ + set objectMode(_om) { + throw new Error("objectMode must be set at instantiation time"); + } + /** + * true if this is an async stream + */ + get ["async"]() { + return this[ASYNC]; + } + /** + * Set to true to make this stream async. + * + * Once set, it cannot be unset, as this would potentially cause incorrect + * behavior. Ie, a sync stream can be made async, but an async stream + * cannot be safely made sync. + */ + set ["async"](a) { + this[ASYNC] = this[ASYNC] || !!a; + } + // drop everything and get out of the flow completely + [ABORT]() { + this[ABORTED] = true; + this.emit("abort", this[SIGNAL]?.reason); + this.destroy(this[SIGNAL]?.reason); + } + /** + * True if the stream has been aborted. + */ + get aborted() { + return this[ABORTED]; + } + /** + * No-op setter. Stream aborted status is set via the AbortSignal provided + * in the constructor options. + */ + set aborted(_) { + } + write(chunk, encoding, cb) { + if (this[ABORTED]) + return false; + if (this[EOF]) + throw new Error("write after end"); + if (this[DESTROYED]) { + this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })); + return true; + } + if (typeof encoding === "function") { + cb = encoding; + encoding = "utf8"; + } + if (!encoding) + encoding = "utf8"; + const fn2 = this[ASYNC] ? defer : nodefer; + if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) { + chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); + } else if (isArrayBufferLike(chunk)) { + chunk = Buffer.from(chunk); + } else if (typeof chunk !== "string") { + throw new Error("Non-contiguous data written to non-objectMode stream"); + } + } + if (this[OBJECTMODE]) { + if (this[FLOWING] && this[BUFFERLENGTH] !== 0) + this[FLUSH](true); + if (this[FLOWING]) + this.emit("data", chunk); + else + this[BUFFERPUSH](chunk); + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + fn2(cb); + return this[FLOWING]; + } + if (!chunk.length) { + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + fn2(cb); + return this[FLOWING]; + } + if (typeof chunk === "string" && // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) { + chunk = Buffer.from(chunk, encoding); + } + if (Buffer.isBuffer(chunk) && this[ENCODING]) { + chunk = this[DECODER].write(chunk); + } + if (this[FLOWING] && this[BUFFERLENGTH] !== 0) + this[FLUSH](true); + if (this[FLOWING]) + this.emit("data", chunk); + else + this[BUFFERPUSH](chunk); + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + fn2(cb); + return this[FLOWING]; + } + /** + * Low-level explicit read method. + * + * In objectMode, the argument is ignored, and one item is returned if + * available. + * + * `n` is the number of bytes (or in the case of encoding streams, + * characters) to consume. If `n` is not provided, then the entire buffer + * is returned, or `null` is returned if no data is available. + * + * If `n` is greater that the amount of data in the internal buffer, + * then `null` is returned. + */ + read(n) { + if (this[DESTROYED]) + return null; + this[DISCARDED] = false; + if (this[BUFFERLENGTH] === 0 || n === 0 || n && n > this[BUFFERLENGTH]) { + this[MAYBE_EMIT_END](); + return null; + } + if (this[OBJECTMODE]) + n = null; + if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { + this[BUFFER] = [ + this[ENCODING] ? this[BUFFER].join("") : Buffer.concat(this[BUFFER], this[BUFFERLENGTH]) + ]; + } + const ret = this[READ](n || null, this[BUFFER][0]); + this[MAYBE_EMIT_END](); + return ret; + } + [READ](n, chunk) { + if (this[OBJECTMODE]) + this[BUFFERSHIFT](); + else { + const c = chunk; + if (n === c.length || n === null) + this[BUFFERSHIFT](); + else if (typeof c === "string") { + this[BUFFER][0] = c.slice(n); + chunk = c.slice(0, n); + this[BUFFERLENGTH] -= n; + } else { + this[BUFFER][0] = c.subarray(n); + chunk = c.subarray(0, n); + this[BUFFERLENGTH] -= n; + } + } + this.emit("data", chunk); + if (!this[BUFFER].length && !this[EOF]) + this.emit("drain"); + return chunk; + } + end(chunk, encoding, cb) { + if (typeof chunk === "function") { + cb = chunk; + chunk = void 0; + } + if (typeof encoding === "function") { + cb = encoding; + encoding = "utf8"; + } + if (chunk !== void 0) + this.write(chunk, encoding); + if (cb) + this.once("end", cb); + this[EOF] = true; + this.writable = false; + if (this[FLOWING] || !this[PAUSED]) + this[MAYBE_EMIT_END](); + return this; + } + // don't let the internal resume be overwritten + [RESUME]() { + if (this[DESTROYED]) + return; + if (!this[DATALISTENERS] && !this[PIPES].length) { + this[DISCARDED] = true; + } + this[PAUSED] = false; + this[FLOWING] = true; + this.emit("resume"); + if (this[BUFFER].length) + this[FLUSH](); + else if (this[EOF]) + this[MAYBE_EMIT_END](); + else + this.emit("drain"); + } + /** + * Resume the stream if it is currently in a paused state + * + * If called when there are no pipe destinations or `data` event listeners, + * this will place the stream in a "discarded" state, where all data will + * be thrown away. The discarded state is removed if a pipe destination or + * data handler is added, if pause() is called, or if any synchronous or + * asynchronous iteration is started. + */ + resume() { + return this[RESUME](); + } + /** + * Pause the stream + */ + pause() { + this[FLOWING] = false; + this[PAUSED] = true; + this[DISCARDED] = false; + } + /** + * true if the stream has been forcibly destroyed + */ + get destroyed() { + return this[DESTROYED]; + } + /** + * true if the stream is currently in a flowing state, meaning that + * any writes will be immediately emitted. + */ + get flowing() { + return this[FLOWING]; + } + /** + * true if the stream is currently in a paused state + */ + get paused() { + return this[PAUSED]; + } + [BUFFERPUSH](chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1; + else + this[BUFFERLENGTH] += chunk.length; + this[BUFFER].push(chunk); + } + [BUFFERSHIFT]() { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1; + else + this[BUFFERLENGTH] -= this[BUFFER][0].length; + return this[BUFFER].shift(); + } + [FLUSH](noDrain = false) { + do { + } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length); + if (!noDrain && !this[BUFFER].length && !this[EOF]) + this.emit("drain"); + } + [FLUSHCHUNK](chunk) { + this.emit("data", chunk); + return this[FLOWING]; + } + /** + * Pipe all data emitted by this stream into the destination provided. + * + * Triggers the flow of data. + */ + pipe(dest, opts) { + if (this[DESTROYED]) + return dest; + this[DISCARDED] = false; + const ended = this[EMITTED_END]; + opts = opts || {}; + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false; + else + opts.end = opts.end !== false; + opts.proxyErrors = !!opts.proxyErrors; + if (ended) { + if (opts.end) + dest.end(); + } else { + this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts)); + if (this[ASYNC]) + defer(() => this[RESUME]()); + else + this[RESUME](); + } + return dest; + } + /** + * Fully unhook a piped destination stream. + * + * If the destination stream was the only consumer of this stream (ie, + * there are no other piped destinations or `'data'` event listeners) + * then the flow of data will stop until there is another consumer or + * {@link Minipass#resume} is explicitly called. + */ + unpipe(dest) { + const p = this[PIPES].find((p2) => p2.dest === dest); + if (p) { + if (this[PIPES].length === 1) { + if (this[FLOWING] && this[DATALISTENERS] === 0) { + this[FLOWING] = false; + } + this[PIPES] = []; + } else + this[PIPES].splice(this[PIPES].indexOf(p), 1); + p.unpipe(); + } + } + /** + * Alias for {@link Minipass#on} + */ + addListener(ev, handler) { + return this.on(ev, handler); + } + /** + * Mostly identical to `EventEmitter.on`, with the following + * behavior differences to prevent data loss and unnecessary hangs: + * + * - Adding a 'data' event handler will trigger the flow of data + * + * - Adding a 'readable' event handler when there is data waiting to be read + * will cause 'readable' to be emitted immediately. + * + * - Adding an 'endish' event handler ('end', 'finish', etc.) which has + * already passed will cause the event to be emitted immediately and all + * handlers removed. + * + * - Adding an 'error' event handler after an error has been emitted will + * cause the event to be re-emitted immediately with the error previously + * raised. + */ + on(ev, handler) { + const ret = super.on(ev, handler); + if (ev === "data") { + this[DISCARDED] = false; + this[DATALISTENERS]++; + if (!this[PIPES].length && !this[FLOWING]) { + this[RESUME](); + } + } else if (ev === "readable" && this[BUFFERLENGTH] !== 0) { + super.emit("readable"); + } else if (isEndish(ev) && this[EMITTED_END]) { + super.emit(ev); + this.removeAllListeners(ev); + } else if (ev === "error" && this[EMITTED_ERROR]) { + const h = handler; + if (this[ASYNC]) + defer(() => h.call(this, this[EMITTED_ERROR])); + else + h.call(this, this[EMITTED_ERROR]); + } + return ret; + } + /** + * Alias for {@link Minipass#off} + */ + removeListener(ev, handler) { + return this.off(ev, handler); + } + /** + * Mostly identical to `EventEmitter.off` + * + * If a 'data' event handler is removed, and it was the last consumer + * (ie, there are no pipe destinations or other 'data' event listeners), + * then the flow of data will stop until there is another consumer or + * {@link Minipass#resume} is explicitly called. + */ + off(ev, handler) { + const ret = super.off(ev, handler); + if (ev === "data") { + this[DATALISTENERS] = this.listeners("data").length; + if (this[DATALISTENERS] === 0 && !this[DISCARDED] && !this[PIPES].length) { + this[FLOWING] = false; + } + } + return ret; + } + /** + * Mostly identical to `EventEmitter.removeAllListeners` + * + * If all 'data' event handlers are removed, and they were the last consumer + * (ie, there are no pipe destinations), then the flow of data will stop + * until there is another consumer or {@link Minipass#resume} is explicitly + * called. + */ + removeAllListeners(ev) { + const ret = super.removeAllListeners(ev); + if (ev === "data" || ev === void 0) { + this[DATALISTENERS] = 0; + if (!this[DISCARDED] && !this[PIPES].length) { + this[FLOWING] = false; + } + } + return ret; + } + /** + * true if the 'end' event has been emitted + */ + get emittedEnd() { + return this[EMITTED_END]; + } + [MAYBE_EMIT_END]() { + if (!this[EMITTING_END] && !this[EMITTED_END] && !this[DESTROYED] && this[BUFFER].length === 0 && this[EOF]) { + this[EMITTING_END] = true; + this.emit("end"); + this.emit("prefinish"); + this.emit("finish"); + if (this[CLOSED]) + this.emit("close"); + this[EMITTING_END] = false; + } + } + /** + * Mostly identical to `EventEmitter.emit`, with the following + * behavior differences to prevent data loss and unnecessary hangs: + * + * If the stream has been destroyed, and the event is something other + * than 'close' or 'error', then `false` is returned and no handlers + * are called. + * + * If the event is 'end', and has already been emitted, then the event + * is ignored. If the stream is in a paused or non-flowing state, then + * the event will be deferred until data flow resumes. If the stream is + * async, then handlers will be called on the next tick rather than + * immediately. + * + * If the event is 'close', and 'end' has not yet been emitted, then + * the event will be deferred until after 'end' is emitted. + * + * If the event is 'error', and an AbortSignal was provided for the stream, + * and there are no listeners, then the event is ignored, matching the + * behavior of node core streams in the presense of an AbortSignal. + * + * If the event is 'finish' or 'prefinish', then all listeners will be + * removed after emitting the event, to prevent double-firing. + */ + emit(ev, ...args) { + const data = args[0]; + if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) { + return false; + } else if (ev === "data") { + return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? (defer(() => this[EMITDATA](data)), true) : this[EMITDATA](data); + } else if (ev === "end") { + return this[EMITEND](); + } else if (ev === "close") { + this[CLOSED] = true; + if (!this[EMITTED_END] && !this[DESTROYED]) + return false; + const ret2 = super.emit("close"); + this.removeAllListeners("close"); + return ret2; + } else if (ev === "error") { + this[EMITTED_ERROR] = data; + super.emit(ERROR, data); + const ret2 = !this[SIGNAL] || this.listeners("error").length ? super.emit("error", data) : false; + this[MAYBE_EMIT_END](); + return ret2; + } else if (ev === "resume") { + const ret2 = super.emit("resume"); + this[MAYBE_EMIT_END](); + return ret2; + } else if (ev === "finish" || ev === "prefinish") { + const ret2 = super.emit(ev); + this.removeAllListeners(ev); + return ret2; + } + const ret = super.emit(ev, ...args); + this[MAYBE_EMIT_END](); + return ret; + } + [EMITDATA](data) { + for (const p of this[PIPES]) { + if (p.dest.write(data) === false) + this.pause(); + } + const ret = this[DISCARDED] ? false : super.emit("data", data); + this[MAYBE_EMIT_END](); + return ret; + } + [EMITEND]() { + if (this[EMITTED_END]) + return false; + this[EMITTED_END] = true; + this.readable = false; + return this[ASYNC] ? (defer(() => this[EMITEND2]()), true) : this[EMITEND2](); + } + [EMITEND2]() { + if (this[DECODER]) { + const data = this[DECODER].end(); + if (data) { + for (const p of this[PIPES]) { + p.dest.write(data); + } + if (!this[DISCARDED]) + super.emit("data", data); + } + } + for (const p of this[PIPES]) { + p.end(); + } + const ret = super.emit("end"); + this.removeAllListeners("end"); + return ret; + } + /** + * Return a Promise that resolves to an array of all emitted data once + * the stream ends. + */ + async collect() { + const buf = Object.assign([], { + dataLength: 0 + }); + if (!this[OBJECTMODE]) + buf.dataLength = 0; + const p = this.promise(); + this.on("data", (c) => { + buf.push(c); + if (!this[OBJECTMODE]) + buf.dataLength += c.length; + }); + await p; + return buf; + } + /** + * Return a Promise that resolves to the concatenation of all emitted data + * once the stream ends. + * + * Not allowed on objectMode streams. + */ + async concat() { + if (this[OBJECTMODE]) { + throw new Error("cannot concat in objectMode"); + } + const buf = await this.collect(); + return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength); + } + /** + * Return a void Promise that resolves once the stream ends. + */ + async promise() { + return new Promise((resolve, reject) => { + this.on(DESTROYED, () => reject(new Error("stream destroyed"))); + this.on("error", (er) => reject(er)); + this.on("end", () => resolve()); + }); + } + /** + * Asynchronous `for await of` iteration. + * + * This will continue emitting all chunks until the stream terminates. + */ + [Symbol.asyncIterator]() { + this[DISCARDED] = false; + let stopped = false; + const stop = async () => { + this.pause(); + stopped = true; + return { value: void 0, done: true }; + }; + const next = () => { + if (stopped) + return stop(); + const res = this.read(); + if (res !== null) + return Promise.resolve({ done: false, value: res }); + if (this[EOF]) + return stop(); + let resolve; + let reject; + const onerr = (er) => { + this.off("data", ondata); + this.off("end", onend); + this.off(DESTROYED, ondestroy); + stop(); + reject(er); + }; + const ondata = (value) => { + this.off("error", onerr); + this.off("end", onend); + this.off(DESTROYED, ondestroy); + this.pause(); + resolve({ value, done: !!this[EOF] }); + }; + const onend = () => { + this.off("error", onerr); + this.off("data", ondata); + this.off(DESTROYED, ondestroy); + stop(); + resolve({ done: true, value: void 0 }); + }; + const ondestroy = () => onerr(new Error("stream destroyed")); + return new Promise((res2, rej) => { + reject = rej; + resolve = res2; + this.once(DESTROYED, ondestroy); + this.once("error", onerr); + this.once("end", onend); + this.once("data", ondata); + }); + }; + return { + next, + throw: stop, + return: stop, + [Symbol.asyncIterator]() { + return this; + } + }; + } + /** + * Synchronous `for of` iteration. + * + * The iteration will terminate when the internal buffer runs out, even + * if the stream has not yet terminated. + */ + [Symbol.iterator]() { + this[DISCARDED] = false; + let stopped = false; + const stop = () => { + this.pause(); + this.off(ERROR, stop); + this.off(DESTROYED, stop); + this.off("end", stop); + stopped = true; + return { done: true, value: void 0 }; + }; + const next = () => { + if (stopped) + return stop(); + const value = this.read(); + return value === null ? stop() : { done: false, value }; + }; + this.once("end", stop); + this.once(ERROR, stop); + this.once(DESTROYED, stop); + return { + next, + throw: stop, + return: stop, + [Symbol.iterator]() { + return this; + } + }; + } + /** + * Destroy a stream, preventing it from being used for any further purpose. + * + * If the stream has a `close()` method, then it will be called on + * destruction. + * + * After destruction, any attempt to write data, read data, or emit most + * events will be ignored. + * + * If an error argument is provided, then it will be emitted in an + * 'error' event. + */ + destroy(er) { + if (this[DESTROYED]) { + if (er) + this.emit("error", er); + else + this.emit(DESTROYED); + return this; + } + this[DESTROYED] = true; + this[DISCARDED] = true; + this[BUFFER].length = 0; + this[BUFFERLENGTH] = 0; + const wc = this; + if (typeof wc.close === "function" && !this[CLOSED]) + wc.close(); + if (er) + this.emit("error", er); + else + this.emit(DESTROYED); + return this; + } + /** + * Alias for {@link isStream} + * + * Former export location, maintained for backwards compatibility. + * + * @deprecated + */ + static get isStream() { + return isStream; + } + }; + } +}); + +// .yarn/cache/@isaacs-fs-minipass-npm-4.0.1-677026e841-c25b6dc159.zip/node_modules/@isaacs/fs-minipass/dist/esm/index.js +var import_events2, import_fs2, writev, _autoClose, _close, _ended, _fd, _finished, _flags, _flush, _handleChunk, _makeBuf, _mode, _needDrain, _onerror, _onopen, _onread, _onwrite, _open, _path, _pos, _queue, _read, _readSize, _reading, _remain, _size, _write, _writing, _defaultFlag, _errored, ReadStream, ReadStreamSync, WriteStream, WriteStreamSync; +var init_esm2 = __esm({ + ".yarn/cache/@isaacs-fs-minipass-npm-4.0.1-677026e841-c25b6dc159.zip/node_modules/@isaacs/fs-minipass/dist/esm/index.js"() { + import_events2 = __toESM(require("events"), 1); + import_fs2 = __toESM(require("fs"), 1); + init_esm(); + writev = import_fs2.default.writev; + _autoClose = Symbol("_autoClose"); + _close = Symbol("_close"); + _ended = Symbol("_ended"); + _fd = Symbol("_fd"); + _finished = Symbol("_finished"); + _flags = Symbol("_flags"); + _flush = Symbol("_flush"); + _handleChunk = Symbol("_handleChunk"); + _makeBuf = Symbol("_makeBuf"); + _mode = Symbol("_mode"); + _needDrain = Symbol("_needDrain"); + _onerror = Symbol("_onerror"); + _onopen = Symbol("_onopen"); + _onread = Symbol("_onread"); + _onwrite = Symbol("_onwrite"); + _open = Symbol("_open"); + _path = Symbol("_path"); + _pos = Symbol("_pos"); + _queue = Symbol("_queue"); + _read = Symbol("_read"); + _readSize = Symbol("_readSize"); + _reading = Symbol("_reading"); + _remain = Symbol("_remain"); + _size = Symbol("_size"); + _write = Symbol("_write"); + _writing = Symbol("_writing"); + _defaultFlag = Symbol("_defaultFlag"); + _errored = Symbol("_errored"); + ReadStream = class extends Minipass { + [_errored] = false; + [_fd]; + [_path]; + [_readSize]; + [_reading] = false; + [_size]; + [_remain]; + [_autoClose]; + constructor(path16, opt) { + opt = opt || {}; + super(opt); + this.readable = true; + this.writable = false; + if (typeof path16 !== "string") { + throw new TypeError("path must be a string"); + } + this[_errored] = false; + this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0; + this[_path] = path16; + this[_readSize] = opt.readSize || 16 * 1024 * 1024; + this[_reading] = false; + this[_size] = typeof opt.size === "number" ? opt.size : Infinity; + this[_remain] = this[_size]; + this[_autoClose] = typeof opt.autoClose === "boolean" ? opt.autoClose : true; + if (typeof this[_fd] === "number") { + this[_read](); + } else { + this[_open](); + } + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + //@ts-ignore + write() { + throw new TypeError("this is a readable stream"); + } + //@ts-ignore + end() { + throw new TypeError("this is a readable stream"); + } + [_open]() { + import_fs2.default.open(this[_path], "r", (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (er) { + this[_onerror](er); + } else { + this[_fd] = fd; + this.emit("open", fd); + this[_read](); + } + } + [_makeBuf]() { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])); + } + [_read]() { + if (!this[_reading]) { + this[_reading] = true; + const buf = this[_makeBuf](); + if (buf.length === 0) { + return process.nextTick(() => this[_onread](null, 0, buf)); + } + import_fs2.default.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); + } + } + [_onread](er, br, buf) { + this[_reading] = false; + if (er) { + this[_onerror](er); + } else if (this[_handleChunk](br, buf)) { + this[_read](); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === "number") { + const fd = this[_fd]; + this[_fd] = void 0; + import_fs2.default.close(fd, (er) => er ? this.emit("error", er) : this.emit("close")); + } + } + [_onerror](er) { + this[_reading] = true; + this[_close](); + this.emit("error", er); + } + [_handleChunk](br, buf) { + let ret = false; + this[_remain] -= br; + if (br > 0) { + ret = super.write(br < buf.length ? buf.subarray(0, br) : buf); + } + if (br === 0 || this[_remain] <= 0) { + ret = false; + this[_close](); + super.end(); + } + return ret; + } + emit(ev, ...args) { + switch (ev) { + case "prefinish": + case "finish": + return false; + case "drain": + if (typeof this[_fd] === "number") { + this[_read](); + } + return false; + case "error": + if (this[_errored]) { + return false; + } + this[_errored] = true; + return super.emit(ev, ...args); + default: + return super.emit(ev, ...args); + } + } + }; + ReadStreamSync = class extends ReadStream { + [_open]() { + let threw = true; + try { + this[_onopen](null, import_fs2.default.openSync(this[_path], "r")); + threw = false; + } finally { + if (threw) { + this[_close](); + } + } + } + [_read]() { + let threw = true; + try { + if (!this[_reading]) { + this[_reading] = true; + do { + const buf = this[_makeBuf](); + const br = buf.length === 0 ? 0 : import_fs2.default.readSync(this[_fd], buf, 0, buf.length, null); + if (!this[_handleChunk](br, buf)) { + break; + } + } while (true); + this[_reading] = false; + } + threw = false; + } finally { + if (threw) { + this[_close](); + } + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === "number") { + const fd = this[_fd]; + this[_fd] = void 0; + import_fs2.default.closeSync(fd); + this.emit("close"); + } + } + }; + WriteStream = class extends import_events2.default { + readable = false; + writable = true; + [_errored] = false; + [_writing] = false; + [_ended] = false; + [_queue] = []; + [_needDrain] = false; + [_path]; + [_mode]; + [_autoClose]; + [_fd]; + [_defaultFlag]; + [_flags]; + [_finished] = false; + [_pos]; + constructor(path16, opt) { + opt = opt || {}; + super(opt); + this[_path] = path16; + this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0; + this[_mode] = opt.mode === void 0 ? 438 : opt.mode; + this[_pos] = typeof opt.start === "number" ? opt.start : void 0; + this[_autoClose] = typeof opt.autoClose === "boolean" ? opt.autoClose : true; + const defaultFlag = this[_pos] !== void 0 ? "r+" : "w"; + this[_defaultFlag] = opt.flags === void 0; + this[_flags] = opt.flags === void 0 ? defaultFlag : opt.flags; + if (this[_fd] === void 0) { + this[_open](); + } + } + emit(ev, ...args) { + if (ev === "error") { + if (this[_errored]) { + return false; + } + this[_errored] = true; + } + return super.emit(ev, ...args); + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + [_onerror](er) { + this[_close](); + this[_writing] = true; + this.emit("error", er); + } + [_open]() { + import_fs2.default.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (this[_defaultFlag] && this[_flags] === "r+" && er && er.code === "ENOENT") { + this[_flags] = "w"; + this[_open](); + } else if (er) { + this[_onerror](er); + } else { + this[_fd] = fd; + this.emit("open", fd); + if (!this[_writing]) { + this[_flush](); + } + } + } + end(buf, enc) { + if (buf) { + this.write(buf, enc); + } + this[_ended] = true; + if (!this[_writing] && !this[_queue].length && typeof this[_fd] === "number") { + this[_onwrite](null, 0); + } + return this; + } + write(buf, enc) { + if (typeof buf === "string") { + buf = Buffer.from(buf, enc); + } + if (this[_ended]) { + this.emit("error", new Error("write() after end()")); + return false; + } + if (this[_fd] === void 0 || this[_writing] || this[_queue].length) { + this[_queue].push(buf); + this[_needDrain] = true; + return false; + } + this[_writing] = true; + this[_write](buf); + return true; + } + [_write](buf) { + import_fs2.default.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + [_onwrite](er, bw) { + if (er) { + this[_onerror](er); + } else { + if (this[_pos] !== void 0 && typeof bw === "number") { + this[_pos] += bw; + } + if (this[_queue].length) { + this[_flush](); + } else { + this[_writing] = false; + if (this[_ended] && !this[_finished]) { + this[_finished] = true; + this[_close](); + this.emit("finish"); + } else if (this[_needDrain]) { + this[_needDrain] = false; + this.emit("drain"); + } + } + } + } + [_flush]() { + if (this[_queue].length === 0) { + if (this[_ended]) { + this[_onwrite](null, 0); + } + } else if (this[_queue].length === 1) { + this[_write](this[_queue].pop()); + } else { + const iovec = this[_queue]; + this[_queue] = []; + writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === "number") { + const fd = this[_fd]; + this[_fd] = void 0; + import_fs2.default.close(fd, (er) => er ? this.emit("error", er) : this.emit("close")); + } + } + }; + WriteStreamSync = class extends WriteStream { + [_open]() { + let fd; + if (this[_defaultFlag] && this[_flags] === "r+") { + try { + fd = import_fs2.default.openSync(this[_path], this[_flags], this[_mode]); + } catch (er) { + if (er?.code === "ENOENT") { + this[_flags] = "w"; + return this[_open](); + } else { + throw er; + } + } + } else { + fd = import_fs2.default.openSync(this[_path], this[_flags], this[_mode]); + } + this[_onopen](null, fd); + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === "number") { + const fd = this[_fd]; + this[_fd] = void 0; + import_fs2.default.closeSync(fd); + this.emit("close"); + } + } + [_write](buf) { + let threw = true; + try { + this[_onwrite](null, import_fs2.default.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); + threw = false; + } finally { + if (threw) { + try { + this[_close](); + } catch { + } + } + } + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/options.js +var argmap, isSyncFile, isAsyncFile, isSyncNoFile, isAsyncNoFile, dealiasKey, dealias; +var init_options = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/options.js"() { + argmap = /* @__PURE__ */ new Map([ + ["C", "cwd"], + ["f", "file"], + ["z", "gzip"], + ["P", "preservePaths"], + ["U", "unlink"], + ["strip-components", "strip"], + ["stripComponents", "strip"], + ["keep-newer", "newer"], + ["keepNewer", "newer"], + ["keep-newer-files", "newer"], + ["keepNewerFiles", "newer"], + ["k", "keep"], + ["keep-existing", "keep"], + ["keepExisting", "keep"], + ["m", "noMtime"], + ["no-mtime", "noMtime"], + ["p", "preserveOwner"], + ["L", "follow"], + ["h", "follow"], + ["onentry", "onReadEntry"] + ]); + isSyncFile = (o) => !!o.sync && !!o.file; + isAsyncFile = (o) => !o.sync && !!o.file; + isSyncNoFile = (o) => !!o.sync && !o.file; + isAsyncNoFile = (o) => !o.sync && !o.file; + dealiasKey = (k) => { + const d = argmap.get(k); + if (d) + return d; + return k; + }; + dealias = (opt = {}) => { + if (!opt) + return {}; + const result = {}; + for (const [key, v] of Object.entries(opt)) { + const k = dealiasKey(key); + result[k] = v; + } + if (result.chmod === void 0 && result.noChmod === false) { + result.chmod = true; + } + delete result.noChmod; + return result; + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/make-command.js +var makeCommand; +var init_make_command = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/make-command.js"() { + init_options(); + makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { + return Object.assign((opt_ = [], entries, cb) => { + if (Array.isArray(opt_)) { + entries = opt_; + opt_ = {}; + } + if (typeof entries === "function") { + cb = entries; + entries = void 0; + } + if (!entries) { + entries = []; + } else { + entries = Array.from(entries); + } + const opt = dealias(opt_); + validate?.(opt, entries); + if (isSyncFile(opt)) { + if (typeof cb === "function") { + throw new TypeError("callback not supported for sync tar functions"); + } + return syncFile(opt, entries); + } else if (isAsyncFile(opt)) { + const p = asyncFile(opt, entries); + const c = cb ? cb : void 0; + return c ? p.then(() => c(), c) : p; + } else if (isSyncNoFile(opt)) { + if (typeof cb === "function") { + throw new TypeError("callback not supported for sync tar functions"); + } + return syncNoFile(opt, entries); + } else if (isAsyncNoFile(opt)) { + if (typeof cb === "function") { + throw new TypeError("callback only supported with file option"); + } + return asyncNoFile(opt, entries); + } else { + throw new Error("impossible options??"); + } + }, { + syncFile, + asyncFile, + syncNoFile, + asyncNoFile, + validate + }); + }; + } +}); + +// .yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/constants.js +var import_zlib, realZlibConstants, constants; +var init_constants = __esm({ + ".yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/constants.js"() { + import_zlib = __toESM(require("zlib"), 1); + realZlibConstants = import_zlib.default.constants || { ZLIB_VERNUM: 4736 }; + constants = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + Z_VERSION_ERROR: -6, + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + DEFLATE: 1, + INFLATE: 2, + GZIP: 3, + GUNZIP: 4, + DEFLATERAW: 5, + INFLATERAW: 6, + UNZIP: 7, + BROTLI_DECODE: 8, + BROTLI_ENCODE: 9, + Z_MIN_WINDOWBITS: 8, + Z_MAX_WINDOWBITS: 15, + Z_DEFAULT_WINDOWBITS: 15, + Z_MIN_CHUNK: 64, + Z_MAX_CHUNK: Infinity, + Z_DEFAULT_CHUNK: 16384, + Z_MIN_MEMLEVEL: 1, + Z_MAX_MEMLEVEL: 9, + Z_DEFAULT_MEMLEVEL: 8, + Z_MIN_LEVEL: -1, + Z_MAX_LEVEL: 9, + Z_DEFAULT_LEVEL: -1, + BROTLI_OPERATION_PROCESS: 0, + BROTLI_OPERATION_FLUSH: 1, + BROTLI_OPERATION_FINISH: 2, + BROTLI_OPERATION_EMIT_METADATA: 3, + BROTLI_MODE_GENERIC: 0, + BROTLI_MODE_TEXT: 1, + BROTLI_MODE_FONT: 2, + BROTLI_DEFAULT_MODE: 0, + BROTLI_MIN_QUALITY: 0, + BROTLI_MAX_QUALITY: 11, + BROTLI_DEFAULT_QUALITY: 11, + BROTLI_MIN_WINDOW_BITS: 10, + BROTLI_MAX_WINDOW_BITS: 24, + BROTLI_LARGE_MAX_WINDOW_BITS: 30, + BROTLI_DEFAULT_WINDOW: 22, + BROTLI_MIN_INPUT_BLOCK_BITS: 16, + BROTLI_MAX_INPUT_BLOCK_BITS: 24, + BROTLI_PARAM_MODE: 0, + BROTLI_PARAM_QUALITY: 1, + BROTLI_PARAM_LGWIN: 2, + BROTLI_PARAM_LGBLOCK: 3, + BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, + BROTLI_PARAM_SIZE_HINT: 5, + BROTLI_PARAM_LARGE_WINDOW: 6, + BROTLI_PARAM_NPOSTFIX: 7, + BROTLI_PARAM_NDIRECT: 8, + BROTLI_DECODER_RESULT_ERROR: 0, + BROTLI_DECODER_RESULT_SUCCESS: 1, + BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, + BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, + BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, + BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, + BROTLI_DECODER_NO_ERROR: 0, + BROTLI_DECODER_SUCCESS: 1, + BROTLI_DECODER_NEEDS_MORE_INPUT: 2, + BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, + BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, + BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, + BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, + BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, + BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, + BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, + BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, + BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, + BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, + BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, + BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, + BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, + BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, + BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, + BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, + BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, + BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, + BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, + BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, + BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, + BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, + BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, + BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, + BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, + BROTLI_DECODER_ERROR_UNREACHABLE: -31 + }, realZlibConstants)); + } +}); + +// .yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/index.js +var import_assert2, import_buffer, realZlib2, OriginalBufferConcat, desc, noop, passthroughBufferConcat, _superWrite, ZlibError, _flushFlag, ZlibBase, Zlib, Gzip, Unzip, Brotli, BrotliCompress, BrotliDecompress, Zstd, ZstdCompress, ZstdDecompress; +var init_esm3 = __esm({ + ".yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/index.js"() { + import_assert2 = __toESM(require("assert"), 1); + import_buffer = require("buffer"); + init_esm(); + realZlib2 = __toESM(require("zlib"), 1); + init_constants(); + init_constants(); + OriginalBufferConcat = import_buffer.Buffer.concat; + desc = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat"); + noop = (args) => args; + passthroughBufferConcat = desc?.writable === true || desc?.set !== void 0 ? (makeNoOp) => { + import_buffer.Buffer.concat = makeNoOp ? noop : OriginalBufferConcat; + } : (_) => { + }; + _superWrite = Symbol("_superWrite"); + ZlibError = class extends Error { + code; + errno; + constructor(err, origin) { + super("zlib: " + err.message, { cause: err }); + this.code = err.code; + this.errno = err.errno; + if (!this.code) + this.code = "ZLIB_ERROR"; + this.message = "zlib: " + err.message; + Error.captureStackTrace(this, origin ?? this.constructor); + } + get name() { + return "ZlibError"; + } + }; + _flushFlag = Symbol("flushFlag"); + ZlibBase = class extends Minipass { + #sawError = false; + #ended = false; + #flushFlag; + #finishFlushFlag; + #fullFlushFlag; + #handle; + #onError; + get sawError() { + return this.#sawError; + } + get handle() { + return this.#handle; + } + /* c8 ignore start */ + get flushFlag() { + return this.#flushFlag; + } + /* c8 ignore stop */ + constructor(opts, mode) { + if (!opts || typeof opts !== "object") + throw new TypeError("invalid options for ZlibBase constructor"); + super(opts); + this.#flushFlag = opts.flush ?? 0; + this.#finishFlushFlag = opts.finishFlush ?? 0; + this.#fullFlushFlag = opts.fullFlushFlag ?? 0; + if (typeof realZlib2[mode] !== "function") { + throw new TypeError("Compression method not supported: " + mode); + } + try { + this.#handle = new realZlib2[mode](opts); + } catch (er) { + throw new ZlibError(er, this.constructor); + } + this.#onError = (err) => { + if (this.#sawError) + return; + this.#sawError = true; + this.close(); + this.emit("error", err); + }; + this.#handle?.on("error", (er) => this.#onError(new ZlibError(er))); + this.once("end", () => this.close); + } + close() { + if (this.#handle) { + this.#handle.close(); + this.#handle = void 0; + this.emit("close"); + } + } + reset() { + if (!this.#sawError) { + (0, import_assert2.default)(this.#handle, "zlib binding closed"); + return this.#handle.reset?.(); + } + } + flush(flushFlag) { + if (this.ended) + return; + if (typeof flushFlag !== "number") + flushFlag = this.#fullFlushFlag; + this.write(Object.assign(import_buffer.Buffer.alloc(0), { [_flushFlag]: flushFlag })); + } + end(chunk, encoding, cb) { + if (typeof chunk === "function") { + cb = chunk; + encoding = void 0; + chunk = void 0; + } + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (chunk) { + if (encoding) + this.write(chunk, encoding); + else + this.write(chunk); + } + this.flush(this.#finishFlushFlag); + this.#ended = true; + return super.end(cb); + } + get ended() { + return this.#ended; + } + // overridden in the gzip classes to do portable writes + [_superWrite](data) { + return super.write(data); + } + write(chunk, encoding, cb) { + if (typeof encoding === "function") + cb = encoding, encoding = "utf8"; + if (typeof chunk === "string") + chunk = import_buffer.Buffer.from(chunk, encoding); + if (this.#sawError) + return; + (0, import_assert2.default)(this.#handle, "zlib binding closed"); + const nativeHandle = this.#handle._handle; + const originalNativeClose = nativeHandle.close; + nativeHandle.close = () => { + }; + const originalClose = this.#handle.close; + this.#handle.close = () => { + }; + passthroughBufferConcat(true); + let result = void 0; + try { + const flushFlag = typeof chunk[_flushFlag] === "number" ? chunk[_flushFlag] : this.#flushFlag; + result = this.#handle._processChunk(chunk, flushFlag); + passthroughBufferConcat(false); + } catch (err) { + passthroughBufferConcat(false); + this.#onError(new ZlibError(err, this.write)); + } finally { + if (this.#handle) { + ; + this.#handle._handle = nativeHandle; + nativeHandle.close = originalNativeClose; + this.#handle.close = originalClose; + this.#handle.removeAllListeners("error"); + } + } + if (this.#handle) + this.#handle.on("error", (er) => this.#onError(new ZlibError(er, this.write))); + let writeReturn; + if (result) { + if (Array.isArray(result) && result.length > 0) { + const r = result[0]; + writeReturn = this[_superWrite](import_buffer.Buffer.from(r)); + for (let i = 1; i < result.length; i++) { + writeReturn = this[_superWrite](result[i]); + } + } else { + writeReturn = this[_superWrite](import_buffer.Buffer.from(result)); + } + } + if (cb) + cb(); + return writeReturn; + } + }; + Zlib = class extends ZlibBase { + #level; + #strategy; + constructor(opts, mode) { + opts = opts || {}; + opts.flush = opts.flush || constants.Z_NO_FLUSH; + opts.finishFlush = opts.finishFlush || constants.Z_FINISH; + opts.fullFlushFlag = constants.Z_FULL_FLUSH; + super(opts, mode); + this.#level = opts.level; + this.#strategy = opts.strategy; + } + params(level, strategy) { + if (this.sawError) + return; + if (!this.handle) + throw new Error("cannot switch params when binding is closed"); + if (!this.handle.params) + throw new Error("not supported in this implementation"); + if (this.#level !== level || this.#strategy !== strategy) { + this.flush(constants.Z_SYNC_FLUSH); + (0, import_assert2.default)(this.handle, "zlib binding closed"); + const origFlush = this.handle.flush; + this.handle.flush = (flushFlag, cb) => { + if (typeof flushFlag === "function") { + cb = flushFlag; + flushFlag = this.flushFlag; + } + this.flush(flushFlag); + cb?.(); + }; + try { + ; + this.handle.params(level, strategy); + } finally { + this.handle.flush = origFlush; + } + if (this.handle) { + this.#level = level; + this.#strategy = strategy; + } + } + } + }; + Gzip = class extends Zlib { + #portable; + constructor(opts) { + super(opts, "Gzip"); + this.#portable = opts && !!opts.portable; + } + [_superWrite](data) { + if (!this.#portable) + return super[_superWrite](data); + this.#portable = false; + data[9] = 255; + return super[_superWrite](data); + } + }; + Unzip = class extends Zlib { + constructor(opts) { + super(opts, "Unzip"); + } + }; + Brotli = class extends ZlibBase { + constructor(opts, mode) { + opts = opts || {}; + opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS; + opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH; + opts.fullFlushFlag = constants.BROTLI_OPERATION_FLUSH; + super(opts, mode); + } + }; + BrotliCompress = class extends Brotli { + constructor(opts) { + super(opts, "BrotliCompress"); + } + }; + BrotliDecompress = class extends Brotli { + constructor(opts) { + super(opts, "BrotliDecompress"); + } + }; + Zstd = class extends ZlibBase { + constructor(opts, mode) { + opts = opts || {}; + opts.flush = opts.flush || constants.ZSTD_e_continue; + opts.finishFlush = opts.finishFlush || constants.ZSTD_e_end; + opts.fullFlushFlag = constants.ZSTD_e_flush; + super(opts, mode); + } + }; + ZstdCompress = class extends Zstd { + constructor(opts) { + super(opts, "ZstdCompress"); + } + }; + ZstdDecompress = class extends Zstd { + constructor(opts) { + super(opts, "ZstdDecompress"); + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/large-numbers.js +var encode, encodePositive, encodeNegative, parse, twos, pos, onesComp, twosComp; +var init_large_numbers = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/large-numbers.js"() { + encode = (num, buf) => { + if (!Number.isSafeInteger(num)) { + throw Error("cannot encode number outside of javascript safe integer range"); + } else if (num < 0) { + encodeNegative(num, buf); + } else { + encodePositive(num, buf); + } + return buf; + }; + encodePositive = (num, buf) => { + buf[0] = 128; + for (var i = buf.length; i > 1; i--) { + buf[i - 1] = num & 255; + num = Math.floor(num / 256); + } + }; + encodeNegative = (num, buf) => { + buf[0] = 255; + var flipped = false; + num = num * -1; + for (var i = buf.length; i > 1; i--) { + var byte = num & 255; + num = Math.floor(num / 256); + if (flipped) { + buf[i - 1] = onesComp(byte); + } else if (byte === 0) { + buf[i - 1] = 0; + } else { + flipped = true; + buf[i - 1] = twosComp(byte); + } + } + }; + parse = (buf) => { + const pre = buf[0]; + const value = pre === 128 ? pos(buf.subarray(1, buf.length)) : pre === 255 ? twos(buf) : null; + if (value === null) { + throw Error("invalid base256 encoding"); + } + if (!Number.isSafeInteger(value)) { + throw Error("parsed number outside of javascript safe integer range"); + } + return value; + }; + twos = (buf) => { + var len = buf.length; + var sum = 0; + var flipped = false; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + var f; + if (flipped) { + f = onesComp(byte); + } else if (byte === 0) { + f = byte; + } else { + flipped = true; + f = twosComp(byte); + } + if (f !== 0) { + sum -= f * Math.pow(256, len - i - 1); + } + } + return sum; + }; + pos = (buf) => { + var len = buf.length; + var sum = 0; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + if (byte !== 0) { + sum += byte * Math.pow(256, len - i - 1); + } + } + return sum; + }; + onesComp = (byte) => (255 ^ byte) & 255; + twosComp = (byte) => (255 ^ byte) + 1 & 255; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/types.js +var isCode, name, code; +var init_types = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/types.js"() { + isCode = (c) => name.has(c); + name = /* @__PURE__ */ new Map([ + ["0", "File"], + // same as File + ["", "OldFile"], + ["1", "Link"], + ["2", "SymbolicLink"], + // Devices and FIFOs aren't fully supported + // they are parsed, but skipped when unpacking + ["3", "CharacterDevice"], + ["4", "BlockDevice"], + ["5", "Directory"], + ["6", "FIFO"], + // same as File + ["7", "ContiguousFile"], + // pax headers + ["g", "GlobalExtendedHeader"], + ["x", "ExtendedHeader"], + // vendor-specific stuff + // skip + ["A", "SolarisACL"], + // like 5, but with data, which should be skipped + ["D", "GNUDumpDir"], + // metadata only, skip + ["I", "Inode"], + // data = link path of next file + ["K", "NextFileHasLongLinkpath"], + // data = path of next file + ["L", "NextFileHasLongPath"], + // skip + ["M", "ContinuationFile"], + // like L + ["N", "OldGnuLongPath"], + // skip + ["S", "SparseFile"], + // skip + ["V", "TapeVolumeHeader"], + // like x + ["X", "OldExtendedHeader"] + ]); + code = new Map(Array.from(name).map((kv) => [kv[1], kv[0]])); + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/header.js +var import_node_path, Header, splitPrefix, decString, decDate, numToDate, decNumber, nanUndef, decSmallNumber, MAXNUM, encNumber, encSmallNumber, octalString, padOctal, encDate, NULLS, encString; +var init_header = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/header.js"() { + import_node_path = require("node:path"); + init_large_numbers(); + init_types(); + Header = class { + cksumValid = false; + needPax = false; + nullBlock = false; + block; + path; + mode; + uid; + gid; + size; + cksum; + #type = "Unsupported"; + linkpath; + uname; + gname; + devmaj = 0; + devmin = 0; + atime; + ctime; + mtime; + charset; + comment; + constructor(data, off = 0, ex, gex) { + if (Buffer.isBuffer(data)) { + this.decode(data, off || 0, ex, gex); + } else if (data) { + this.#slurp(data); + } + } + decode(buf, off, ex, gex) { + if (!off) { + off = 0; + } + if (!buf || !(buf.length >= off + 512)) { + throw new Error("need 512 bytes for header"); + } + this.path = ex?.path ?? decString(buf, off, 100); + this.mode = ex?.mode ?? gex?.mode ?? decNumber(buf, off + 100, 8); + this.uid = ex?.uid ?? gex?.uid ?? decNumber(buf, off + 108, 8); + this.gid = ex?.gid ?? gex?.gid ?? decNumber(buf, off + 116, 8); + this.size = ex?.size ?? gex?.size ?? decNumber(buf, off + 124, 12); + this.mtime = ex?.mtime ?? gex?.mtime ?? decDate(buf, off + 136, 12); + this.cksum = decNumber(buf, off + 148, 12); + if (gex) + this.#slurp(gex, true); + if (ex) + this.#slurp(ex); + const t = decString(buf, off + 156, 1); + if (isCode(t)) { + this.#type = t || "0"; + } + if (this.#type === "0" && this.path.slice(-1) === "/") { + this.#type = "5"; + } + if (this.#type === "5") { + this.size = 0; + } + this.linkpath = decString(buf, off + 157, 100); + if (buf.subarray(off + 257, off + 265).toString() === "ustar\x0000") { + this.uname = ex?.uname ?? gex?.uname ?? decString(buf, off + 265, 32); + this.gname = ex?.gname ?? gex?.gname ?? decString(buf, off + 297, 32); + this.devmaj = ex?.devmaj ?? gex?.devmaj ?? decNumber(buf, off + 329, 8) ?? 0; + this.devmin = ex?.devmin ?? gex?.devmin ?? decNumber(buf, off + 337, 8) ?? 0; + if (buf[off + 475] !== 0) { + const prefix = decString(buf, off + 345, 155); + this.path = prefix + "/" + this.path; + } else { + const prefix = decString(buf, off + 345, 130); + if (prefix) { + this.path = prefix + "/" + this.path; + } + this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12); + this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12); + } + } + let sum = 8 * 32; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksumValid = sum === this.cksum; + if (this.cksum === void 0 && sum === 8 * 32) { + this.nullBlock = true; + } + } + #slurp(ex, gex = false) { + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + return !(v === null || v === void 0 || k === "path" && gex || k === "linkpath" && gex || k === "global"); + }))); + } + encode(buf, off = 0) { + if (!buf) { + buf = this.block = Buffer.alloc(512); + } + if (this.#type === "Unsupported") { + this.#type = "0"; + } + if (!(buf.length >= off + 512)) { + throw new Error("need 512 bytes for header"); + } + const prefixSize = this.ctime || this.atime ? 130 : 155; + const split = splitPrefix(this.path || "", prefixSize); + const path16 = split[0]; + const prefix = split[1]; + this.needPax = !!split[2]; + this.needPax = encString(buf, off, 100, path16) || this.needPax; + this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax; + this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax; + this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax; + this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax; + this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax; + buf[off + 156] = this.#type.charCodeAt(0); + this.needPax = encString(buf, off + 157, 100, this.linkpath) || this.needPax; + buf.write("ustar\x0000", off + 257, 8); + this.needPax = encString(buf, off + 265, 32, this.uname) || this.needPax; + this.needPax = encString(buf, off + 297, 32, this.gname) || this.needPax; + this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; + this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax; + this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax; + if (buf[off + 475] !== 0) { + this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax; + } else { + this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax; + this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax; + this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax; + } + let sum = 8 * 32; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksum = sum; + encNumber(buf, off + 148, 8, this.cksum); + this.cksumValid = true; + return this.needPax; + } + get type() { + return this.#type === "Unsupported" ? this.#type : name.get(this.#type); + } + get typeKey() { + return this.#type; + } + set type(type) { + const c = String(code.get(type)); + if (isCode(c) || c === "Unsupported") { + this.#type = c; + } else if (isCode(type)) { + this.#type = type; + } else { + throw new TypeError("invalid entry type: " + type); + } + } + }; + splitPrefix = (p, prefixSize) => { + const pathSize = 100; + let pp = p; + let prefix = ""; + let ret = void 0; + const root = import_node_path.posix.parse(p).root || "."; + if (Buffer.byteLength(pp) < pathSize) { + ret = [pp, prefix, false]; + } else { + prefix = import_node_path.posix.dirname(pp); + pp = import_node_path.posix.basename(pp); + do { + if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize) { + ret = [pp, prefix, false]; + } else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) { + ret = [pp.slice(0, pathSize - 1), prefix, true]; + } else { + pp = import_node_path.posix.join(import_node_path.posix.basename(prefix), pp); + prefix = import_node_path.posix.dirname(prefix); + } + } while (prefix !== root && ret === void 0); + if (!ret) { + ret = [p.slice(0, pathSize - 1), "", true]; + } + } + return ret; + }; + decString = (buf, off, size) => buf.subarray(off, off + size).toString("utf8").replace(/\0.*/, ""); + decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); + numToDate = (num) => num === void 0 ? void 0 : new Date(num * 1e3); + decNumber = (buf, off, size) => Number(buf[off]) & 128 ? parse(buf.subarray(off, off + size)) : decSmallNumber(buf, off, size); + nanUndef = (value) => isNaN(value) ? void 0 : value; + decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf.subarray(off, off + size).toString("utf8").replace(/\0.*$/, "").trim(), 8)); + MAXNUM = { + 12: 8589934591, + 8: 2097151 + }; + encNumber = (buf, off, size, num) => num === void 0 ? false : num > MAXNUM[size] || num < 0 ? (encode(num, buf.subarray(off, off + size)), true) : (encSmallNumber(buf, off, size, num), false); + encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, "ascii"); + octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); + padOctal = (str, size) => (str.length === size - 1 ? str : new Array(size - str.length - 1).join("0") + str + " ") + "\0"; + encDate = (buf, off, size, date) => date === void 0 ? false : encNumber(buf, off, size, date.getTime() / 1e3); + NULLS = new Array(156).join("\0"); + encString = (buf, off, size, str) => str === void 0 ? false : (buf.write(str + NULLS, off, size, "utf8"), str.length !== Buffer.byteLength(str) || str.length > size); + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pax.js +var import_node_path2, Pax, merge, parseKV, parseKVLine; +var init_pax = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pax.js"() { + import_node_path2 = require("node:path"); + init_header(); + Pax = class _Pax { + atime; + mtime; + ctime; + charset; + comment; + gid; + uid; + gname; + uname; + linkpath; + dev; + ino; + nlink; + path; + size; + mode; + global; + constructor(obj, global2 = false) { + this.atime = obj.atime; + this.charset = obj.charset; + this.comment = obj.comment; + this.ctime = obj.ctime; + this.dev = obj.dev; + this.gid = obj.gid; + this.global = global2; + this.gname = obj.gname; + this.ino = obj.ino; + this.linkpath = obj.linkpath; + this.mtime = obj.mtime; + this.nlink = obj.nlink; + this.path = obj.path; + this.size = obj.size; + this.uid = obj.uid; + this.uname = obj.uname; + } + encode() { + const body = this.encodeBody(); + if (body === "") { + return Buffer.allocUnsafe(0); + } + const bodyLen = Buffer.byteLength(body); + const bufLen = 512 * Math.ceil(1 + bodyLen / 512); + const buf = Buffer.allocUnsafe(bufLen); + for (let i = 0; i < 512; i++) { + buf[i] = 0; + } + new Header({ + // XXX split the path + // then the path should be PaxHeader + basename, but less than 99, + // prepend with the dirname + /* c8 ignore start */ + path: ("PaxHeader/" + (0, import_node_path2.basename)(this.path ?? "")).slice(0, 99), + /* c8 ignore stop */ + mode: this.mode || 420, + uid: this.uid, + gid: this.gid, + size: bodyLen, + mtime: this.mtime, + type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", + linkpath: "", + uname: this.uname || "", + gname: this.gname || "", + devmaj: 0, + devmin: 0, + atime: this.atime, + ctime: this.ctime + }).encode(buf); + buf.write(body, 512, bodyLen, "utf8"); + for (let i = bodyLen + 512; i < buf.length; i++) { + buf[i] = 0; + } + return buf; + } + encodeBody() { + return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname"); + } + encodeField(field) { + if (this[field] === void 0) { + return ""; + } + const r = this[field]; + const v = r instanceof Date ? r.getTime() / 1e3 : r; + const s = " " + (field === "dev" || field === "ino" || field === "nlink" ? "SCHILY." : "") + field + "=" + v + "\n"; + const byteLen = Buffer.byteLength(s); + let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; + if (byteLen + digits >= Math.pow(10, digits)) { + digits += 1; + } + const len = digits + byteLen; + return len + s; + } + static parse(str, ex, g = false) { + return new _Pax(merge(parseKV(str), ex), g); + } + }; + merge = (a, b) => b ? Object.assign({}, b, a) : a; + parseKV = (str) => str.replace(/\n$/, "").split("\n").reduce(parseKVLine, /* @__PURE__ */ Object.create(null)); + parseKVLine = (set, line) => { + const n = parseInt(line, 10); + if (n !== Buffer.byteLength(line) + 1) { + return set; + } + line = line.slice((n + " ").length); + const kv = line.split("="); + const r = kv.shift(); + if (!r) { + return set; + } + const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"); + const v = kv.join("="); + set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? new Date(Number(v) * 1e3) : /^[0-9]+$/.test(v) ? +v : v; + return set; + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-windows-path.js +var platform, normalizeWindowsPath; +var init_normalize_windows_path = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-windows-path.js"() { + platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; + normalizeWindowsPath = platform !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/"); + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/read-entry.js +var ReadEntry; +var init_read_entry = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/read-entry.js"() { + init_esm(); + init_normalize_windows_path(); + ReadEntry = class extends Minipass { + extended; + globalExtended; + header; + startBlockSize; + blockRemain; + remain; + type; + meta = false; + ignore = false; + path; + mode; + uid; + gid; + uname; + gname; + size = 0; + mtime; + atime; + ctime; + linkpath; + dev; + ino; + nlink; + invalid = false; + absolute; + unsupported = false; + constructor(header, ex, gex) { + super({}); + this.pause(); + this.extended = ex; + this.globalExtended = gex; + this.header = header; + this.remain = header.size ?? 0; + this.startBlockSize = 512 * Math.ceil(this.remain / 512); + this.blockRemain = this.startBlockSize; + this.type = header.type; + switch (this.type) { + case "File": + case "OldFile": + case "Link": + case "SymbolicLink": + case "CharacterDevice": + case "BlockDevice": + case "Directory": + case "FIFO": + case "ContiguousFile": + case "GNUDumpDir": + break; + case "NextFileHasLongLinkpath": + case "NextFileHasLongPath": + case "OldGnuLongPath": + case "GlobalExtendedHeader": + case "ExtendedHeader": + case "OldExtendedHeader": + this.meta = true; + break; + // NOTE: gnutar and bsdtar treat unrecognized types as 'File' + // it may be worth doing the same, but with a warning. + default: + this.ignore = true; + } + if (!header.path) { + throw new Error("no path provided for tar.ReadEntry"); + } + this.path = normalizeWindowsPath(header.path); + this.mode = header.mode; + if (this.mode) { + this.mode = this.mode & 4095; + } + this.uid = header.uid; + this.gid = header.gid; + this.uname = header.uname; + this.gname = header.gname; + this.size = this.remain; + this.mtime = header.mtime; + this.atime = header.atime; + this.ctime = header.ctime; + this.linkpath = header.linkpath ? normalizeWindowsPath(header.linkpath) : void 0; + this.uname = header.uname; + this.gname = header.gname; + if (ex) { + this.#slurp(ex); + } + if (gex) { + this.#slurp(gex, true); + } + } + write(data) { + const writeLen = data.length; + if (writeLen > this.blockRemain) { + throw new Error("writing more to entry than is appropriate"); + } + const r = this.remain; + const br = this.blockRemain; + this.remain = Math.max(0, r - writeLen); + this.blockRemain = Math.max(0, br - writeLen); + if (this.ignore) { + return true; + } + if (r >= writeLen) { + return super.write(data); + } + return super.write(data.subarray(0, r)); + } + #slurp(ex, gex = false) { + if (ex.path) + ex.path = normalizeWindowsPath(ex.path); + if (ex.linkpath) + ex.linkpath = normalizeWindowsPath(ex.linkpath); + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + return !(v === null || v === void 0 || k === "path" && gex); + }))); + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/warn-method.js +var warnMethod; +var init_warn_method = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/warn-method.js"() { + warnMethod = (self2, code2, message, data = {}) => { + if (self2.file) { + data.file = self2.file; + } + if (self2.cwd) { + data.cwd = self2.cwd; + } + data.code = message instanceof Error && message.code || code2; + data.tarCode = code2; + if (!self2.strict && data.recoverable !== false) { + if (message instanceof Error) { + data = Object.assign(message, data); + message = message.message; + } + self2.emit("warn", code2, message, data); + } else if (message instanceof Error) { + self2.emit("error", Object.assign(message, data)); + } else { + self2.emit("error", Object.assign(new Error(`${code2}: ${message}`), data)); + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/parse.js +var import_events3, maxMetaEntrySize, gzipHeader, zstdHeader, ZIP_HEADER_LEN, STATE, WRITEENTRY, READENTRY, NEXTENTRY, PROCESSENTRY, EX, GEX, META, EMITMETA, BUFFER2, QUEUE, ENDED, EMITTEDEND, EMIT, UNZIP, CONSUMECHUNK, CONSUMECHUNKSUB, CONSUMEBODY, CONSUMEMETA, CONSUMEHEADER, CONSUMING, BUFFERCONCAT, MAYBEEND, WRITING, ABORTED2, DONE, SAW_VALID_ENTRY, SAW_NULL_BLOCK, SAW_EOF, CLOSESTREAM, noop2, Parser; +var init_parse = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/parse.js"() { + import_events3 = require("events"); + init_esm3(); + init_header(); + init_pax(); + init_read_entry(); + init_warn_method(); + maxMetaEntrySize = 1024 * 1024; + gzipHeader = Buffer.from([31, 139]); + zstdHeader = Buffer.from([40, 181, 47, 253]); + ZIP_HEADER_LEN = Math.max(gzipHeader.length, zstdHeader.length); + STATE = Symbol("state"); + WRITEENTRY = Symbol("writeEntry"); + READENTRY = Symbol("readEntry"); + NEXTENTRY = Symbol("nextEntry"); + PROCESSENTRY = Symbol("processEntry"); + EX = Symbol("extendedHeader"); + GEX = Symbol("globalExtendedHeader"); + META = Symbol("meta"); + EMITMETA = Symbol("emitMeta"); + BUFFER2 = Symbol("buffer"); + QUEUE = Symbol("queue"); + ENDED = Symbol("ended"); + EMITTEDEND = Symbol("emittedEnd"); + EMIT = Symbol("emit"); + UNZIP = Symbol("unzip"); + CONSUMECHUNK = Symbol("consumeChunk"); + CONSUMECHUNKSUB = Symbol("consumeChunkSub"); + CONSUMEBODY = Symbol("consumeBody"); + CONSUMEMETA = Symbol("consumeMeta"); + CONSUMEHEADER = Symbol("consumeHeader"); + CONSUMING = Symbol("consuming"); + BUFFERCONCAT = Symbol("bufferConcat"); + MAYBEEND = Symbol("maybeEnd"); + WRITING = Symbol("writing"); + ABORTED2 = Symbol("aborted"); + DONE = Symbol("onDone"); + SAW_VALID_ENTRY = Symbol("sawValidEntry"); + SAW_NULL_BLOCK = Symbol("sawNullBlock"); + SAW_EOF = Symbol("sawEOF"); + CLOSESTREAM = Symbol("closeStream"); + noop2 = () => true; + Parser = class extends import_events3.EventEmitter { + file; + strict; + maxMetaEntrySize; + filter; + brotli; + zstd; + writable = true; + readable = false; + [QUEUE] = []; + [BUFFER2]; + [READENTRY]; + [WRITEENTRY]; + [STATE] = "begin"; + [META] = ""; + [EX]; + [GEX]; + [ENDED] = false; + [UNZIP]; + [ABORTED2] = false; + [SAW_VALID_ENTRY]; + [SAW_NULL_BLOCK] = false; + [SAW_EOF] = false; + [WRITING] = false; + [CONSUMING] = false; + [EMITTEDEND] = false; + constructor(opt = {}) { + super(); + this.file = opt.file || ""; + this.on(DONE, () => { + if (this[STATE] === "begin" || this[SAW_VALID_ENTRY] === false) { + this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format"); + } + }); + if (opt.ondone) { + this.on(DONE, opt.ondone); + } else { + this.on(DONE, () => { + this.emit("prefinish"); + this.emit("finish"); + this.emit("end"); + }); + } + this.strict = !!opt.strict; + this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; + this.filter = typeof opt.filter === "function" ? opt.filter : noop2; + const isTBR = opt.file && (opt.file.endsWith(".tar.br") || opt.file.endsWith(".tbr")); + this.brotli = !(opt.gzip || opt.zstd) && opt.brotli !== void 0 ? opt.brotli : isTBR ? void 0 : false; + const isTZST = opt.file && (opt.file.endsWith(".tar.zst") || opt.file.endsWith(".tzst")); + this.zstd = !(opt.gzip || opt.brotli) && opt.zstd !== void 0 ? opt.zstd : isTZST ? true : void 0; + this.on("end", () => this[CLOSESTREAM]()); + if (typeof opt.onwarn === "function") { + this.on("warn", opt.onwarn); + } + if (typeof opt.onReadEntry === "function") { + this.on("entry", opt.onReadEntry); + } + } + warn(code2, message, data = {}) { + warnMethod(this, code2, message, data); + } + [CONSUMEHEADER](chunk, position) { + if (this[SAW_VALID_ENTRY] === void 0) { + this[SAW_VALID_ENTRY] = false; + } + let header; + try { + header = new Header(chunk, position, this[EX], this[GEX]); + } catch (er) { + return this.warn("TAR_ENTRY_INVALID", er); + } + if (header.nullBlock) { + if (this[SAW_NULL_BLOCK]) { + this[SAW_EOF] = true; + if (this[STATE] === "begin") { + this[STATE] = "header"; + } + this[EMIT]("eof"); + } else { + this[SAW_NULL_BLOCK] = true; + this[EMIT]("nullBlock"); + } + } else { + this[SAW_NULL_BLOCK] = false; + if (!header.cksumValid) { + this.warn("TAR_ENTRY_INVALID", "checksum failure", { header }); + } else if (!header.path) { + this.warn("TAR_ENTRY_INVALID", "path is required", { header }); + } else { + const type = header.type; + if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { + this.warn("TAR_ENTRY_INVALID", "linkpath required", { + header + }); + } else if (!/^(Symbolic)?Link$/.test(type) && !/^(Global)?ExtendedHeader$/.test(type) && header.linkpath) { + this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { + header + }); + } else { + const entry = this[WRITEENTRY] = new ReadEntry(header, this[EX], this[GEX]); + if (!this[SAW_VALID_ENTRY]) { + if (entry.remain) { + const onend = () => { + if (!entry.invalid) { + this[SAW_VALID_ENTRY] = true; + } + }; + entry.on("end", onend); + } else { + this[SAW_VALID_ENTRY] = true; + } + } + if (entry.meta) { + if (entry.size > this.maxMetaEntrySize) { + entry.ignore = true; + this[EMIT]("ignoredEntry", entry); + this[STATE] = "ignore"; + entry.resume(); + } else if (entry.size > 0) { + this[META] = ""; + entry.on("data", (c) => this[META] += c); + this[STATE] = "meta"; + } + } else { + this[EX] = void 0; + entry.ignore = entry.ignore || !this.filter(entry.path, entry); + if (entry.ignore) { + this[EMIT]("ignoredEntry", entry); + this[STATE] = entry.remain ? "ignore" : "header"; + entry.resume(); + } else { + if (entry.remain) { + this[STATE] = "body"; + } else { + this[STATE] = "header"; + entry.end(); + } + if (!this[READENTRY]) { + this[QUEUE].push(entry); + this[NEXTENTRY](); + } else { + this[QUEUE].push(entry); + } + } + } + } + } + } + } + [CLOSESTREAM]() { + queueMicrotask(() => this.emit("close")); + } + [PROCESSENTRY](entry) { + let go = true; + if (!entry) { + this[READENTRY] = void 0; + go = false; + } else if (Array.isArray(entry)) { + const [ev, ...args] = entry; + this.emit(ev, ...args); + } else { + this[READENTRY] = entry; + this.emit("entry", entry); + if (!entry.emittedEnd) { + entry.on("end", () => this[NEXTENTRY]()); + go = false; + } + } + return go; + } + [NEXTENTRY]() { + do { + } while (this[PROCESSENTRY](this[QUEUE].shift())); + if (!this[QUEUE].length) { + const re = this[READENTRY]; + const drainNow = !re || re.flowing || re.size === re.remain; + if (drainNow) { + if (!this[WRITING]) { + this.emit("drain"); + } + } else { + re.once("drain", () => this.emit("drain")); + } + } + } + [CONSUMEBODY](chunk, position) { + const entry = this[WRITEENTRY]; + if (!entry) { + throw new Error("attempt to consume body without entry??"); + } + const br = entry.blockRemain ?? 0; + const c = br >= chunk.length && position === 0 ? chunk : chunk.subarray(position, position + br); + entry.write(c); + if (!entry.blockRemain) { + this[STATE] = "header"; + this[WRITEENTRY] = void 0; + entry.end(); + } + return c.length; + } + [CONSUMEMETA](chunk, position) { + const entry = this[WRITEENTRY]; + const ret = this[CONSUMEBODY](chunk, position); + if (!this[WRITEENTRY] && entry) { + this[EMITMETA](entry); + } + return ret; + } + [EMIT](ev, data, extra) { + if (!this[QUEUE].length && !this[READENTRY]) { + this.emit(ev, data, extra); + } else { + this[QUEUE].push([ev, data, extra]); + } + } + [EMITMETA](entry) { + this[EMIT]("meta", this[META]); + switch (entry.type) { + case "ExtendedHeader": + case "OldExtendedHeader": + this[EX] = Pax.parse(this[META], this[EX], false); + break; + case "GlobalExtendedHeader": + this[GEX] = Pax.parse(this[META], this[GEX], true); + break; + case "NextFileHasLongPath": + case "OldGnuLongPath": { + const ex = this[EX] ?? /* @__PURE__ */ Object.create(null); + this[EX] = ex; + ex.path = this[META].replace(/\0.*/, ""); + break; + } + case "NextFileHasLongLinkpath": { + const ex = this[EX] || /* @__PURE__ */ Object.create(null); + this[EX] = ex; + ex.linkpath = this[META].replace(/\0.*/, ""); + break; + } + /* c8 ignore start */ + default: + throw new Error("unknown meta: " + entry.type); + } + } + abort(error) { + this[ABORTED2] = true; + this.emit("abort", error); + this.warn("TAR_ABORT", error, { recoverable: false }); + } + write(chunk, encoding, cb) { + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (typeof chunk === "string") { + chunk = Buffer.from( + chunk, + /* c8 ignore next */ + typeof encoding === "string" ? encoding : "utf8" + ); + } + if (this[ABORTED2]) { + cb?.(); + return false; + } + const needSniff = this[UNZIP] === void 0 || this.brotli === void 0 && this[UNZIP] === false; + if (needSniff && chunk) { + if (this[BUFFER2]) { + chunk = Buffer.concat([this[BUFFER2], chunk]); + this[BUFFER2] = void 0; + } + if (chunk.length < ZIP_HEADER_LEN) { + this[BUFFER2] = chunk; + cb?.(); + return true; + } + for (let i = 0; this[UNZIP] === void 0 && i < gzipHeader.length; i++) { + if (chunk[i] !== gzipHeader[i]) { + this[UNZIP] = false; + } + } + let isZstd = false; + if (this[UNZIP] === false && this.zstd !== false) { + isZstd = true; + for (let i = 0; i < zstdHeader.length; i++) { + if (chunk[i] !== zstdHeader[i]) { + isZstd = false; + break; + } + } + } + const maybeBrotli = this.brotli === void 0 && !isZstd; + if (this[UNZIP] === false && maybeBrotli) { + if (chunk.length < 512) { + if (this[ENDED]) { + this.brotli = true; + } else { + this[BUFFER2] = chunk; + cb?.(); + return true; + } + } else { + try { + new Header(chunk.subarray(0, 512)); + this.brotli = false; + } catch (_) { + this.brotli = true; + } + } + } + if (this[UNZIP] === void 0 || this[UNZIP] === false && (this.brotli || isZstd)) { + const ended = this[ENDED]; + this[ENDED] = false; + this[UNZIP] = this[UNZIP] === void 0 ? new Unzip({}) : isZstd ? new ZstdDecompress({}) : new BrotliDecompress({}); + this[UNZIP].on("data", (chunk2) => this[CONSUMECHUNK](chunk2)); + this[UNZIP].on("error", (er) => this.abort(er)); + this[UNZIP].on("end", () => { + this[ENDED] = true; + this[CONSUMECHUNK](); + }); + this[WRITING] = true; + const ret2 = !!this[UNZIP][ended ? "end" : "write"](chunk); + this[WRITING] = false; + cb?.(); + return ret2; + } + } + this[WRITING] = true; + if (this[UNZIP]) { + this[UNZIP].write(chunk); + } else { + this[CONSUMECHUNK](chunk); + } + this[WRITING] = false; + const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true; + if (!ret && !this[QUEUE].length) { + this[READENTRY]?.once("drain", () => this.emit("drain")); + } + cb?.(); + return ret; + } + [BUFFERCONCAT](c) { + if (c && !this[ABORTED2]) { + this[BUFFER2] = this[BUFFER2] ? Buffer.concat([this[BUFFER2], c]) : c; + } + } + [MAYBEEND]() { + if (this[ENDED] && !this[EMITTEDEND] && !this[ABORTED2] && !this[CONSUMING]) { + this[EMITTEDEND] = true; + const entry = this[WRITEENTRY]; + if (entry && entry.blockRemain) { + const have = this[BUFFER2] ? this[BUFFER2].length : 0; + this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); + if (this[BUFFER2]) { + entry.write(this[BUFFER2]); + } + entry.end(); + } + this[EMIT](DONE); + } + } + [CONSUMECHUNK](chunk) { + if (this[CONSUMING] && chunk) { + this[BUFFERCONCAT](chunk); + } else if (!chunk && !this[BUFFER2]) { + this[MAYBEEND](); + } else if (chunk) { + this[CONSUMING] = true; + if (this[BUFFER2]) { + this[BUFFERCONCAT](chunk); + const c = this[BUFFER2]; + this[BUFFER2] = void 0; + this[CONSUMECHUNKSUB](c); + } else { + this[CONSUMECHUNKSUB](chunk); + } + while (this[BUFFER2] && this[BUFFER2]?.length >= 512 && !this[ABORTED2] && !this[SAW_EOF]) { + const c = this[BUFFER2]; + this[BUFFER2] = void 0; + this[CONSUMECHUNKSUB](c); + } + this[CONSUMING] = false; + } + if (!this[BUFFER2] || this[ENDED]) { + this[MAYBEEND](); + } + } + [CONSUMECHUNKSUB](chunk) { + let position = 0; + const length = chunk.length; + while (position + 512 <= length && !this[ABORTED2] && !this[SAW_EOF]) { + switch (this[STATE]) { + case "begin": + case "header": + this[CONSUMEHEADER](chunk, position); + position += 512; + break; + case "ignore": + case "body": + position += this[CONSUMEBODY](chunk, position); + break; + case "meta": + position += this[CONSUMEMETA](chunk, position); + break; + /* c8 ignore start */ + default: + throw new Error("invalid state: " + this[STATE]); + } + } + if (position < length) { + if (this[BUFFER2]) { + this[BUFFER2] = Buffer.concat([ + chunk.subarray(position), + this[BUFFER2] + ]); + } else { + this[BUFFER2] = chunk.subarray(position); + } + } + } + end(chunk, encoding, cb) { + if (typeof chunk === "function") { + cb = chunk; + encoding = void 0; + chunk = void 0; + } + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (cb) + this.once("finish", cb); + if (!this[ABORTED2]) { + if (this[UNZIP]) { + if (chunk) + this[UNZIP].write(chunk); + this[UNZIP].end(); + } else { + this[ENDED] = true; + if (this.brotli === void 0 || this.zstd === void 0) + chunk = chunk || Buffer.alloc(0); + if (chunk) + this.write(chunk); + this[MAYBEEND](); + } + } + return this; + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-trailing-slashes.js +var stripTrailingSlashes; +var init_strip_trailing_slashes = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-trailing-slashes.js"() { + stripTrailingSlashes = (str) => { + let i = str.length - 1; + let slashesStart = -1; + while (i > -1 && str.charAt(i) === "/") { + slashesStart = i; + i--; + } + return slashesStart === -1 ? str : str.slice(0, slashesStart); + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/list.js +var list_exports = {}; +__export(list_exports, { + filesFilter: () => filesFilter, + list: () => list +}); +var import_node_fs, import_path2, onReadEntryFunction, filesFilter, listFileSync, listFile, list; +var init_list = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/list.js"() { + init_esm2(); + import_node_fs = __toESM(require("node:fs"), 1); + import_path2 = require("path"); + init_make_command(); + init_parse(); + init_strip_trailing_slashes(); + onReadEntryFunction = (opt) => { + const onReadEntry = opt.onReadEntry; + opt.onReadEntry = onReadEntry ? (e) => { + onReadEntry(e); + e.resume(); + } : (e) => e.resume(); + }; + filesFilter = (opt, files) => { + const map = new Map(files.map((f) => [stripTrailingSlashes(f), true])); + const filter = opt.filter; + const mapHas = (file, r = "") => { + const root = r || (0, import_path2.parse)(file).root || "."; + let ret; + if (file === root) + ret = false; + else { + const m = map.get(file); + if (m !== void 0) { + ret = m; + } else { + ret = mapHas((0, import_path2.dirname)(file), root); + } + } + map.set(file, ret); + return ret; + }; + opt.filter = filter ? (file, entry) => filter(file, entry) && mapHas(stripTrailingSlashes(file)) : (file) => mapHas(stripTrailingSlashes(file)); + }; + listFileSync = (opt) => { + const p = new Parser(opt); + const file = opt.file; + let fd; + try { + fd = import_node_fs.default.openSync(file, "r"); + const stat = import_node_fs.default.fstatSync(fd); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + if (stat.size < readSize) { + const buf = Buffer.allocUnsafe(stat.size); + const read = import_node_fs.default.readSync(fd, buf, 0, stat.size, 0); + p.end(read === buf.byteLength ? buf : buf.subarray(0, read)); + } else { + let pos2 = 0; + const buf = Buffer.allocUnsafe(readSize); + while (pos2 < stat.size) { + const bytesRead = import_node_fs.default.readSync(fd, buf, 0, readSize, pos2); + if (bytesRead === 0) + break; + pos2 += bytesRead; + p.write(buf.subarray(0, bytesRead)); + } + p.end(); + } + } finally { + if (typeof fd === "number") { + try { + import_node_fs.default.closeSync(fd); + } catch (er) { + } + } + } + }; + listFile = (opt, _files) => { + const parse4 = new Parser(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + parse4.on("error", reject); + parse4.on("end", resolve); + import_node_fs.default.stat(file, (er, stat) => { + if (er) { + reject(er); + } else { + const stream = new ReadStream(file, { + readSize, + size: stat.size + }); + stream.on("error", reject); + stream.pipe(parse4); + } + }); + }); + return p; + }; + list = makeCommand(listFileSync, listFile, (opt) => new Parser(opt), (opt) => new Parser(opt), (opt, files) => { + if (files?.length) + filesFilter(opt, files); + if (!opt.noResume) + onReadEntryFunction(opt); + }); + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/get-write-flag.js +var import_fs3, platform2, isWindows, O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP, fMapEnabled, fMapLimit, fMapFlag, getWriteFlag; +var init_get_write_flag = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/get-write-flag.js"() { + import_fs3 = __toESM(require("fs"), 1); + platform2 = process.env.__FAKE_PLATFORM__ || process.platform; + isWindows = platform2 === "win32"; + ({ O_CREAT, O_TRUNC, O_WRONLY } = import_fs3.default.constants); + UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs3.default.constants.UV_FS_O_FILEMAP || 0; + fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; + fMapLimit = 512 * 1024; + fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; + getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMapFlag : "w"; + } +}); + +// .yarn/cache/chownr-npm-3.0.0-5275e85d25-43925b8770.zip/node_modules/chownr/dist/esm/index.js +var import_node_fs2, import_node_path3, lchownSync, chown, chownrKid, chownr, chownrKidSync, chownrSync; +var init_esm4 = __esm({ + ".yarn/cache/chownr-npm-3.0.0-5275e85d25-43925b8770.zip/node_modules/chownr/dist/esm/index.js"() { + import_node_fs2 = __toESM(require("node:fs"), 1); + import_node_path3 = __toESM(require("node:path"), 1); + lchownSync = (path16, uid, gid) => { + try { + return import_node_fs2.default.lchownSync(path16, uid, gid); + } catch (er) { + if (er?.code !== "ENOENT") + throw er; + } + }; + chown = (cpath, uid, gid, cb) => { + import_node_fs2.default.lchown(cpath, uid, gid, (er) => { + cb(er && er?.code !== "ENOENT" ? er : null); + }); + }; + chownrKid = (p, child, uid, gid, cb) => { + if (child.isDirectory()) { + chownr(import_node_path3.default.resolve(p, child.name), uid, gid, (er) => { + if (er) + return cb(er); + const cpath = import_node_path3.default.resolve(p, child.name); + chown(cpath, uid, gid, cb); + }); + } else { + const cpath = import_node_path3.default.resolve(p, child.name); + chown(cpath, uid, gid, cb); + } + }; + chownr = (p, uid, gid, cb) => { + import_node_fs2.default.readdir(p, { withFileTypes: true }, (er, children) => { + if (er) { + if (er.code === "ENOENT") + return cb(); + else if (er.code !== "ENOTDIR" && er.code !== "ENOTSUP") + return cb(er); + } + if (er || !children.length) + return chown(p, uid, gid, cb); + let len = children.length; + let errState = null; + const then = (er2) => { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--len === 0) + return chown(p, uid, gid, cb); + }; + for (const child of children) { + chownrKid(p, child, uid, gid, then); + } + }); + }; + chownrKidSync = (p, child, uid, gid) => { + if (child.isDirectory()) + chownrSync(import_node_path3.default.resolve(p, child.name), uid, gid); + lchownSync(import_node_path3.default.resolve(p, child.name), uid, gid); + }; + chownrSync = (p, uid, gid) => { + let children; + try { + children = import_node_fs2.default.readdirSync(p, { withFileTypes: true }); + } catch (er) { + const e = er; + if (e?.code === "ENOENT") + return; + else if (e?.code === "ENOTDIR" || e?.code === "ENOTSUP") + return lchownSync(p, uid, gid); + else + throw e; + } + for (const child of children) { + chownrKidSync(p, child, uid, gid); + } + return lchownSync(p, uid, gid); + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/cwd-error.js +var CwdError; +var init_cwd_error = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/cwd-error.js"() { + CwdError = class extends Error { + path; + code; + syscall = "chdir"; + constructor(path16, code2) { + super(`${code2}: Cannot cd into '${path16}'`); + this.path = path16; + this.code = code2; + } + get name() { + return "CwdError"; + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/symlink-error.js +var SymlinkError; +var init_symlink_error = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/symlink-error.js"() { + SymlinkError = class extends Error { + path; + symlink; + syscall = "symlink"; + code = "TAR_SYMLINK_ERROR"; + constructor(symlink, path16) { + super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"); + this.symlink = symlink; + this.path = path16; + } + get name() { + return "SymlinkError"; + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mkdir.js +var import_node_fs3, import_promises, import_node_path4, checkCwd, mkdir, mkdir_, onmkdir, checkCwdSync, mkdirSync2; +var init_mkdir = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mkdir.js"() { + init_esm4(); + import_node_fs3 = __toESM(require("node:fs"), 1); + import_promises = __toESM(require("node:fs/promises"), 1); + import_node_path4 = __toESM(require("node:path"), 1); + init_cwd_error(); + init_normalize_windows_path(); + init_symlink_error(); + checkCwd = (dir, cb) => { + import_node_fs3.default.stat(dir, (er, st) => { + if (er || !st.isDirectory()) { + er = new CwdError(dir, er?.code || "ENOTDIR"); + } + cb(er); + }); + }; + mkdir = (dir, opt, cb) => { + dir = normalizeWindowsPath(dir); + const umask = opt.umask ?? 18; + const mode = opt.mode | 448; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === "number" && typeof gid === "number" && (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cwd = normalizeWindowsPath(opt.cwd); + const done = (er, created) => { + if (er) { + cb(er); + } else { + if (created && doChown) { + chownr(created, uid, gid, (er2) => done(er2)); + } else if (needChmod) { + import_node_fs3.default.chmod(dir, mode, cb); + } else { + cb(); + } + } + }; + if (dir === cwd) { + return checkCwd(dir, done); + } + if (preserve) { + return import_promises.default.mkdir(dir, { mode, recursive: true }).then( + (made) => done(null, made ?? void 0), + // oh, ts + done + ); + } + const sub = normalizeWindowsPath(import_node_path4.default.relative(cwd, dir)); + const parts = sub.split("/"); + mkdir_(cwd, parts, mode, unlink, cwd, void 0, done); + }; + mkdir_ = (base, parts, mode, unlink, cwd, created, cb) => { + if (!parts.length) { + return cb(null, created); + } + const p = parts.shift(); + const part = normalizeWindowsPath(import_node_path4.default.resolve(base + "/" + p)); + import_node_fs3.default.mkdir(part, mode, onmkdir(part, parts, mode, unlink, cwd, created, cb)); + }; + onmkdir = (part, parts, mode, unlink, cwd, created, cb) => (er) => { + if (er) { + import_node_fs3.default.lstat(part, (statEr, st) => { + if (statEr) { + statEr.path = statEr.path && normalizeWindowsPath(statEr.path); + cb(statEr); + } else if (st.isDirectory()) { + mkdir_(part, parts, mode, unlink, cwd, created, cb); + } else if (unlink) { + import_node_fs3.default.unlink(part, (er2) => { + if (er2) { + return cb(er2); + } + import_node_fs3.default.mkdir(part, mode, onmkdir(part, parts, mode, unlink, cwd, created, cb)); + }); + } else if (st.isSymbolicLink()) { + return cb(new SymlinkError(part, part + "/" + parts.join("/"))); + } else { + cb(er); + } + }); + } else { + created = created || part; + mkdir_(part, parts, mode, unlink, cwd, created, cb); + } + }; + checkCwdSync = (dir) => { + let ok = false; + let code2 = void 0; + try { + ok = import_node_fs3.default.statSync(dir).isDirectory(); + } catch (er) { + code2 = er?.code; + } finally { + if (!ok) { + throw new CwdError(dir, code2 ?? "ENOTDIR"); + } + } + }; + mkdirSync2 = (dir, opt) => { + dir = normalizeWindowsPath(dir); + const umask = opt.umask ?? 18; + const mode = opt.mode | 448; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === "number" && typeof gid === "number" && (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cwd = normalizeWindowsPath(opt.cwd); + const done = (created2) => { + if (created2 && doChown) { + chownrSync(created2, uid, gid); + } + if (needChmod) { + import_node_fs3.default.chmodSync(dir, mode); + } + }; + if (dir === cwd) { + checkCwdSync(cwd); + return done(); + } + if (preserve) { + return done(import_node_fs3.default.mkdirSync(dir, { mode, recursive: true }) ?? void 0); + } + const sub = normalizeWindowsPath(import_node_path4.default.relative(cwd, dir)); + const parts = sub.split("/"); + let created = void 0; + for (let p = parts.shift(), part = cwd; p && (part += "/" + p); p = parts.shift()) { + part = normalizeWindowsPath(import_node_path4.default.resolve(part)); + try { + import_node_fs3.default.mkdirSync(part, mode); + created = created || part; + } catch (er) { + const st = import_node_fs3.default.lstatSync(part); + if (st.isDirectory()) { + continue; + } else if (unlink) { + import_node_fs3.default.unlinkSync(part); + import_node_fs3.default.mkdirSync(part, mode); + created = created || part; + continue; + } else if (st.isSymbolicLink()) { + return new SymlinkError(part, part + "/" + parts.join("/")); + } + } + } + return done(created); + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-absolute-path.js +var import_node_path5, isAbsolute, parse3, stripAbsolutePath; +var init_strip_absolute_path = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-absolute-path.js"() { + import_node_path5 = require("node:path"); + ({ isAbsolute, parse: parse3 } = import_node_path5.win32); + stripAbsolutePath = (path16) => { + let r = ""; + let parsed = parse3(path16); + while (isAbsolute(path16) || parsed.root) { + const root = path16.charAt(0) === "/" && path16.slice(0, 4) !== "//?/" ? "/" : parsed.root; + path16 = path16.slice(root.length); + r += root; + parsed = parse3(path16); + } + return [r, path16]; + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/winchars.js +var raw, win, toWin, toRaw, encode2, decode; +var init_winchars = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/winchars.js"() { + raw = ["|", "<", ">", "?", ":"]; + win = raw.map((char) => String.fromCharCode(61440 + char.charCodeAt(0))); + toWin = new Map(raw.map((char, i) => [char, win[i]])); + toRaw = new Map(win.map((char, i) => [char, raw[i]])); + encode2 = (s) => raw.reduce((s2, c) => s2.split(c).join(toWin.get(c)), s); + decode = (s) => win.reduce((s2, c) => s2.split(c).join(toRaw.get(c)), s); + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-unicode.js +var normalizeCache, MAX, cache, normalizeUnicode; +var init_normalize_unicode = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-unicode.js"() { + normalizeCache = /* @__PURE__ */ Object.create(null); + MAX = 1e4; + cache = /* @__PURE__ */ new Set(); + normalizeUnicode = (s) => { + if (!cache.has(s)) { + normalizeCache[s] = s.normalize("NFD"); + } else { + cache.delete(s); + } + cache.add(s); + const ret = normalizeCache[s]; + let i = cache.size - MAX; + if (i > MAX / 10) { + for (const s2 of cache) { + cache.delete(s2); + delete normalizeCache[s2]; + if (--i <= 0) + break; + } + } + return ret; + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/path-reservations.js +var import_node_path6, platform3, isWindows2, getDirs, PathReservations; +var init_path_reservations = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/path-reservations.js"() { + import_node_path6 = require("node:path"); + init_normalize_unicode(); + init_strip_trailing_slashes(); + platform3 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; + isWindows2 = platform3 === "win32"; + getDirs = (path16) => { + const dirs = path16.split("/").slice(0, -1).reduce((set, path17) => { + const s = set[set.length - 1]; + if (s !== void 0) { + path17 = (0, import_node_path6.join)(s, path17); + } + set.push(path17 || "/"); + return set; + }, []); + return dirs; + }; + PathReservations = class { + // path => [function or Set] + // A Set object means a directory reservation + // A fn is a direct reservation on that path + #queues = /* @__PURE__ */ new Map(); + // fn => {paths:[path,...], dirs:[path, ...]} + #reservations = /* @__PURE__ */ new Map(); + // functions currently running + #running = /* @__PURE__ */ new Set(); + reserve(paths, fn2) { + paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p) => { + return stripTrailingSlashes((0, import_node_path6.join)(normalizeUnicode(p))).toLowerCase(); + }); + const dirs = new Set(paths.map((path16) => getDirs(path16)).reduce((a, b) => a.concat(b))); + this.#reservations.set(fn2, { dirs, paths }); + for (const p of paths) { + const q = this.#queues.get(p); + if (!q) { + this.#queues.set(p, [fn2]); + } else { + q.push(fn2); + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + if (!q) { + this.#queues.set(dir, [/* @__PURE__ */ new Set([fn2])]); + } else { + const l = q[q.length - 1]; + if (l instanceof Set) { + l.add(fn2); + } else { + q.push(/* @__PURE__ */ new Set([fn2])); + } + } + } + return this.#run(fn2); + } + // return the queues for each path the function cares about + // fn => {paths, dirs} + #getQueues(fn2) { + const res = this.#reservations.get(fn2); + if (!res) { + throw new Error("function does not have any path reservations"); + } + return { + paths: res.paths.map((path16) => this.#queues.get(path16)), + dirs: [...res.dirs].map((path16) => this.#queues.get(path16)) + }; + } + // check if fn is first in line for all its paths, and is + // included in the first set for all its dir queues + check(fn2) { + const { paths, dirs } = this.#getQueues(fn2); + return paths.every((q) => q && q[0] === fn2) && dirs.every((q) => q && q[0] instanceof Set && q[0].has(fn2)); + } + // run the function if it's first in line and not already running + #run(fn2) { + if (this.#running.has(fn2) || !this.check(fn2)) { + return false; + } + this.#running.add(fn2); + fn2(() => this.#clear(fn2)); + return true; + } + #clear(fn2) { + if (!this.#running.has(fn2)) { + return false; + } + const res = this.#reservations.get(fn2); + if (!res) { + throw new Error("invalid reservation"); + } + const { paths, dirs } = res; + const next = /* @__PURE__ */ new Set(); + for (const path16 of paths) { + const q = this.#queues.get(path16); + if (!q || q?.[0] !== fn2) { + continue; + } + const q0 = q[1]; + if (!q0) { + this.#queues.delete(path16); + continue; + } + q.shift(); + if (typeof q0 === "function") { + next.add(q0); + } else { + for (const f of q0) { + next.add(f); + } + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + const q0 = q?.[0]; + if (!q || !(q0 instanceof Set)) + continue; + if (q0.size === 1 && q.length === 1) { + this.#queues.delete(dir); + continue; + } else if (q0.size === 1) { + q.shift(); + const n = q[0]; + if (typeof n === "function") { + next.add(n); + } + } else { + q0.delete(fn2); + } + } + this.#running.delete(fn2); + next.forEach((fn3) => this.#run(fn3)); + return true; + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/unpack.js +var import_node_assert, import_node_crypto, import_node_fs4, import_node_path7, ONENTRY, CHECKFS, CHECKFS2, ISREUSABLE, MAKEFS, FILE, DIRECTORY, LINK, SYMLINK, HARDLINK, UNSUPPORTED, CHECKPATH, MKDIR, ONERROR, PENDING, PEND, UNPEND, ENDED2, MAYBECLOSE, SKIP, DOCHOWN, UID, GID, CHECKED_CWD, platform4, isWindows3, DEFAULT_MAX_DEPTH, unlinkFile, unlinkFileSync, uint32, Unpack, callSync, UnpackSync; +var init_unpack = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/unpack.js"() { + init_esm2(); + import_node_assert = __toESM(require("node:assert"), 1); + import_node_crypto = require("node:crypto"); + import_node_fs4 = __toESM(require("node:fs"), 1); + import_node_path7 = __toESM(require("node:path"), 1); + init_get_write_flag(); + init_mkdir(); + init_normalize_windows_path(); + init_parse(); + init_strip_absolute_path(); + init_winchars(); + init_path_reservations(); + ONENTRY = Symbol("onEntry"); + CHECKFS = Symbol("checkFs"); + CHECKFS2 = Symbol("checkFs2"); + ISREUSABLE = Symbol("isReusable"); + MAKEFS = Symbol("makeFs"); + FILE = Symbol("file"); + DIRECTORY = Symbol("directory"); + LINK = Symbol("link"); + SYMLINK = Symbol("symlink"); + HARDLINK = Symbol("hardlink"); + UNSUPPORTED = Symbol("unsupported"); + CHECKPATH = Symbol("checkPath"); + MKDIR = Symbol("mkdir"); + ONERROR = Symbol("onError"); + PENDING = Symbol("pending"); + PEND = Symbol("pend"); + UNPEND = Symbol("unpend"); + ENDED2 = Symbol("ended"); + MAYBECLOSE = Symbol("maybeClose"); + SKIP = Symbol("skip"); + DOCHOWN = Symbol("doChown"); + UID = Symbol("uid"); + GID = Symbol("gid"); + CHECKED_CWD = Symbol("checkedCwd"); + platform4 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; + isWindows3 = platform4 === "win32"; + DEFAULT_MAX_DEPTH = 1024; + unlinkFile = (path16, cb) => { + if (!isWindows3) { + return import_node_fs4.default.unlink(path16, cb); + } + const name2 = path16 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex"); + import_node_fs4.default.rename(path16, name2, (er) => { + if (er) { + return cb(er); + } + import_node_fs4.default.unlink(name2, cb); + }); + }; + unlinkFileSync = (path16) => { + if (!isWindows3) { + return import_node_fs4.default.unlinkSync(path16); + } + const name2 = path16 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex"); + import_node_fs4.default.renameSync(path16, name2); + import_node_fs4.default.unlinkSync(name2); + }; + uint32 = (a, b, c) => a !== void 0 && a === a >>> 0 ? a : b !== void 0 && b === b >>> 0 ? b : c; + Unpack = class extends Parser { + [ENDED2] = false; + [CHECKED_CWD] = false; + [PENDING] = 0; + reservations = new PathReservations(); + transform; + writable = true; + readable = false; + uid; + gid; + setOwner; + preserveOwner; + processGid; + processUid; + maxDepth; + forceChown; + win32; + newer; + keep; + noMtime; + preservePaths; + unlink; + cwd; + strip; + processUmask; + umask; + dmode; + fmode; + chmod; + constructor(opt = {}) { + opt.ondone = () => { + this[ENDED2] = true; + this[MAYBECLOSE](); + }; + super(opt); + this.transform = opt.transform; + this.chmod = !!opt.chmod; + if (typeof opt.uid === "number" || typeof opt.gid === "number") { + if (typeof opt.uid !== "number" || typeof opt.gid !== "number") { + throw new TypeError("cannot set owner without number uid and gid"); + } + if (opt.preserveOwner) { + throw new TypeError("cannot preserve owner in archive and also set owner explicitly"); + } + this.uid = opt.uid; + this.gid = opt.gid; + this.setOwner = true; + } else { + this.uid = void 0; + this.gid = void 0; + this.setOwner = false; + } + if (opt.preserveOwner === void 0 && typeof opt.uid !== "number") { + this.preserveOwner = !!(process.getuid && process.getuid() === 0); + } else { + this.preserveOwner = !!opt.preserveOwner; + } + this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0; + this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0; + this.maxDepth = typeof opt.maxDepth === "number" ? opt.maxDepth : DEFAULT_MAX_DEPTH; + this.forceChown = opt.forceChown === true; + this.win32 = !!opt.win32 || isWindows3; + this.newer = !!opt.newer; + this.keep = !!opt.keep; + this.noMtime = !!opt.noMtime; + this.preservePaths = !!opt.preservePaths; + this.unlink = !!opt.unlink; + this.cwd = normalizeWindowsPath(import_node_path7.default.resolve(opt.cwd || process.cwd())); + this.strip = Number(opt.strip) || 0; + this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask(); + this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask; + this.dmode = opt.dmode || 511 & ~this.umask; + this.fmode = opt.fmode || 438 & ~this.umask; + this.on("entry", (entry) => this[ONENTRY](entry)); + } + // a bad or damaged archive is a warning for Parser, but an error + // when extracting. Mark those errors as unrecoverable, because + // the Unpack contract cannot be met. + warn(code2, msg, data = {}) { + if (code2 === "TAR_BAD_ARCHIVE" || code2 === "TAR_ABORT") { + data.recoverable = false; + } + return super.warn(code2, msg, data); + } + [MAYBECLOSE]() { + if (this[ENDED2] && this[PENDING] === 0) { + this.emit("prefinish"); + this.emit("finish"); + this.emit("end"); + } + } + [CHECKPATH](entry) { + const p = normalizeWindowsPath(entry.path); + const parts = p.split("/"); + if (this.strip) { + if (parts.length < this.strip) { + return false; + } + if (entry.type === "Link") { + const linkparts = normalizeWindowsPath(String(entry.linkpath)).split("/"); + if (linkparts.length >= this.strip) { + entry.linkpath = linkparts.slice(this.strip).join("/"); + } else { + return false; + } + } + parts.splice(0, this.strip); + entry.path = parts.join("/"); + } + if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { + this.warn("TAR_ENTRY_ERROR", "path excessively deep", { + entry, + path: p, + depth: parts.length, + maxDepth: this.maxDepth + }); + return false; + } + if (!this.preservePaths) { + if (parts.includes("..") || /* c8 ignore next */ + isWindows3 && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) { + this.warn("TAR_ENTRY_ERROR", `path contains '..'`, { + entry, + path: p + }); + return false; + } + const [root, stripped] = stripAbsolutePath(p); + if (root) { + entry.path = String(stripped); + this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute path`, { + entry, + path: p + }); + } + } + if (import_node_path7.default.isAbsolute(entry.path)) { + entry.absolute = normalizeWindowsPath(import_node_path7.default.resolve(entry.path)); + } else { + entry.absolute = normalizeWindowsPath(import_node_path7.default.resolve(this.cwd, entry.path)); + } + if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) { + this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { + entry, + path: normalizeWindowsPath(entry.path), + resolvedPath: entry.absolute, + cwd: this.cwd + }); + return false; + } + if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") { + return false; + } + if (this.win32) { + const { root: aRoot } = import_node_path7.default.win32.parse(String(entry.absolute)); + entry.absolute = aRoot + encode2(String(entry.absolute).slice(aRoot.length)); + const { root: pRoot } = import_node_path7.default.win32.parse(entry.path); + entry.path = pRoot + encode2(entry.path.slice(pRoot.length)); + } + return true; + } + [ONENTRY](entry) { + if (!this[CHECKPATH](entry)) { + return entry.resume(); + } + import_node_assert.default.equal(typeof entry.absolute, "string"); + switch (entry.type) { + case "Directory": + case "GNUDumpDir": + if (entry.mode) { + entry.mode = entry.mode | 448; + } + // eslint-disable-next-line no-fallthrough + case "File": + case "OldFile": + case "ContiguousFile": + case "Link": + case "SymbolicLink": + return this[CHECKFS](entry); + case "CharacterDevice": + case "BlockDevice": + case "FIFO": + default: + return this[UNSUPPORTED](entry); + } + } + [ONERROR](er, entry) { + if (er.name === "CwdError") { + this.emit("error", er); + } else { + this.warn("TAR_ENTRY_ERROR", er, { entry }); + this[UNPEND](); + entry.resume(); + } + } + [MKDIR](dir, mode, cb) { + mkdir(normalizeWindowsPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cwd: this.cwd, + mode + }, cb); + } + [DOCHOWN](entry) { + return this.forceChown || this.preserveOwner && (typeof entry.uid === "number" && entry.uid !== this.processUid || typeof entry.gid === "number" && entry.gid !== this.processGid) || typeof this.uid === "number" && this.uid !== this.processUid || typeof this.gid === "number" && this.gid !== this.processGid; + } + [UID](entry) { + return uint32(this.uid, entry.uid, this.processUid); + } + [GID](entry) { + return uint32(this.gid, entry.gid, this.processGid); + } + [FILE](entry, fullyDone) { + const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.fmode; + const stream = new WriteStream(String(entry.absolute), { + // slight lie, but it can be numeric flags + flags: getWriteFlag(entry.size), + mode, + autoClose: false + }); + stream.on("error", (er) => { + if (stream.fd) { + import_node_fs4.default.close(stream.fd, () => { + }); + } + stream.write = () => true; + this[ONERROR](er, entry); + fullyDone(); + }); + let actions = 1; + const done = (er) => { + if (er) { + if (stream.fd) { + import_node_fs4.default.close(stream.fd, () => { + }); + } + this[ONERROR](er, entry); + fullyDone(); + return; + } + if (--actions === 0) { + if (stream.fd !== void 0) { + import_node_fs4.default.close(stream.fd, (er2) => { + if (er2) { + this[ONERROR](er2, entry); + } else { + this[UNPEND](); + } + fullyDone(); + }); + } + } + }; + stream.on("finish", () => { + const abs = String(entry.absolute); + const fd = stream.fd; + if (typeof fd === "number" && entry.mtime && !this.noMtime) { + actions++; + const atime = entry.atime || /* @__PURE__ */ new Date(); + const mtime = entry.mtime; + import_node_fs4.default.futimes(fd, atime, mtime, (er) => er ? import_node_fs4.default.utimes(abs, atime, mtime, (er2) => done(er2 && er)) : done()); + } + if (typeof fd === "number" && this[DOCHOWN](entry)) { + actions++; + const uid = this[UID](entry); + const gid = this[GID](entry); + if (typeof uid === "number" && typeof gid === "number") { + import_node_fs4.default.fchown(fd, uid, gid, (er) => er ? import_node_fs4.default.chown(abs, uid, gid, (er2) => done(er2 && er)) : done()); + } + } + done(); + }); + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on("error", (er) => { + this[ONERROR](er, entry); + fullyDone(); + }); + entry.pipe(tx); + } + tx.pipe(stream); + } + [DIRECTORY](entry, fullyDone) { + const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.dmode; + this[MKDIR](String(entry.absolute), mode, (er) => { + if (er) { + this[ONERROR](er, entry); + fullyDone(); + return; + } + let actions = 1; + const done = () => { + if (--actions === 0) { + fullyDone(); + this[UNPEND](); + entry.resume(); + } + }; + if (entry.mtime && !this.noMtime) { + actions++; + import_node_fs4.default.utimes(String(entry.absolute), entry.atime || /* @__PURE__ */ new Date(), entry.mtime, done); + } + if (this[DOCHOWN](entry)) { + actions++; + import_node_fs4.default.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); + } + done(); + }); + } + [UNSUPPORTED](entry) { + entry.unsupported = true; + this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${entry.type}`, { entry }); + entry.resume(); + } + [SYMLINK](entry, done) { + this[LINK](entry, String(entry.linkpath), "symlink", done); + } + [HARDLINK](entry, done) { + const linkpath = normalizeWindowsPath(import_node_path7.default.resolve(this.cwd, String(entry.linkpath))); + this[LINK](entry, linkpath, "link", done); + } + [PEND]() { + this[PENDING]++; + } + [UNPEND]() { + this[PENDING]--; + this[MAYBECLOSE](); + } + [SKIP](entry) { + this[UNPEND](); + entry.resume(); + } + // Check if we can reuse an existing filesystem entry safely and + // overwrite it, rather than unlinking and recreating + // Windows doesn't report a useful nlink, so we just never reuse entries + [ISREUSABLE](entry, st) { + return entry.type === "File" && !this.unlink && st.isFile() && st.nlink <= 1 && !isWindows3; + } + // check if a thing is there, and if so, try to clobber it + [CHECKFS](entry) { + this[PEND](); + const paths = [entry.path]; + if (entry.linkpath) { + paths.push(entry.linkpath); + } + this.reservations.reserve(paths, (done) => this[CHECKFS2](entry, done)); + } + [CHECKFS2](entry, fullyDone) { + const done = (er) => { + fullyDone(er); + }; + const checkCwd2 = () => { + this[MKDIR](this.cwd, this.dmode, (er) => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + this[CHECKED_CWD] = true; + start(); + }); + }; + const start = () => { + if (entry.absolute !== this.cwd) { + const parent = normalizeWindowsPath(import_node_path7.default.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + return this[MKDIR](parent, this.dmode, (er) => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + afterMakeParent(); + }); + } + } + afterMakeParent(); + }; + const afterMakeParent = () => { + import_node_fs4.default.lstat(String(entry.absolute), (lstatEr, st) => { + if (st && (this.keep || /* c8 ignore next */ + this.newer && st.mtime > (entry.mtime ?? st.mtime))) { + this[SKIP](entry); + done(); + return; + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry, done); + } + if (st.isDirectory()) { + if (entry.type === "Directory") { + const needChmod = this.chmod && entry.mode && (st.mode & 4095) !== entry.mode; + const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); + if (!needChmod) { + return afterChmod(); + } + return import_node_fs4.default.chmod(String(entry.absolute), Number(entry.mode), afterChmod); + } + if (entry.absolute !== this.cwd) { + return import_node_fs4.default.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); + } + } + if (entry.absolute === this.cwd) { + return this[MAKEFS](null, entry, done); + } + unlinkFile(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); + }); + }; + if (this[CHECKED_CWD]) { + start(); + } else { + checkCwd2(); + } + } + [MAKEFS](er, entry, done) { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + switch (entry.type) { + case "File": + case "OldFile": + case "ContiguousFile": + return this[FILE](entry, done); + case "Link": + return this[HARDLINK](entry, done); + case "SymbolicLink": + return this[SYMLINK](entry, done); + case "Directory": + case "GNUDumpDir": + return this[DIRECTORY](entry, done); + } + } + [LINK](entry, linkpath, link, done) { + import_node_fs4.default[link](linkpath, String(entry.absolute), (er) => { + if (er) { + this[ONERROR](er, entry); + } else { + this[UNPEND](); + entry.resume(); + } + done(); + }); + } + }; + callSync = (fn2) => { + try { + return [null, fn2()]; + } catch (er) { + return [er, null]; + } + }; + UnpackSync = class extends Unpack { + sync = true; + [MAKEFS](er, entry) { + return super[MAKEFS](er, entry, () => { + }); + } + [CHECKFS](entry) { + if (!this[CHECKED_CWD]) { + const er2 = this[MKDIR](this.cwd, this.dmode); + if (er2) { + return this[ONERROR](er2, entry); + } + this[CHECKED_CWD] = true; + } + if (entry.absolute !== this.cwd) { + const parent = normalizeWindowsPath(import_node_path7.default.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + const mkParent = this[MKDIR](parent, this.dmode); + if (mkParent) { + return this[ONERROR](mkParent, entry); + } + } + } + const [lstatEr, st] = callSync(() => import_node_fs4.default.lstatSync(String(entry.absolute))); + if (st && (this.keep || /* c8 ignore next */ + this.newer && st.mtime > (entry.mtime ?? st.mtime))) { + return this[SKIP](entry); + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry); + } + if (st.isDirectory()) { + if (entry.type === "Directory") { + const needChmod = this.chmod && entry.mode && (st.mode & 4095) !== entry.mode; + const [er3] = needChmod ? callSync(() => { + import_node_fs4.default.chmodSync(String(entry.absolute), Number(entry.mode)); + }) : []; + return this[MAKEFS](er3, entry); + } + const [er2] = callSync(() => import_node_fs4.default.rmdirSync(String(entry.absolute))); + this[MAKEFS](er2, entry); + } + const [er] = entry.absolute === this.cwd ? [] : callSync(() => unlinkFileSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + [FILE](entry, done) { + const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.fmode; + const oner = (er) => { + let closeError; + try { + import_node_fs4.default.closeSync(fd); + } catch (e) { + closeError = e; + } + if (er || closeError) { + this[ONERROR](er || closeError, entry); + } + done(); + }; + let fd; + try { + fd = import_node_fs4.default.openSync(String(entry.absolute), getWriteFlag(entry.size), mode); + } catch (er) { + return oner(er); + } + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on("error", (er) => this[ONERROR](er, entry)); + entry.pipe(tx); + } + tx.on("data", (chunk) => { + try { + import_node_fs4.default.writeSync(fd, chunk, 0, chunk.length); + } catch (er) { + oner(er); + } + }); + tx.on("end", () => { + let er = null; + if (entry.mtime && !this.noMtime) { + const atime = entry.atime || /* @__PURE__ */ new Date(); + const mtime = entry.mtime; + try { + import_node_fs4.default.futimesSync(fd, atime, mtime); + } catch (futimeser) { + try { + import_node_fs4.default.utimesSync(String(entry.absolute), atime, mtime); + } catch (utimeser) { + er = futimeser; + } + } + } + if (this[DOCHOWN](entry)) { + const uid = this[UID](entry); + const gid = this[GID](entry); + try { + import_node_fs4.default.fchownSync(fd, Number(uid), Number(gid)); + } catch (fchowner) { + try { + import_node_fs4.default.chownSync(String(entry.absolute), Number(uid), Number(gid)); + } catch (chowner) { + er = er || fchowner; + } + } + } + oner(er); + }); + } + [DIRECTORY](entry, done) { + const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.dmode; + const er = this[MKDIR](String(entry.absolute), mode); + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + if (entry.mtime && !this.noMtime) { + try { + import_node_fs4.default.utimesSync(String(entry.absolute), entry.atime || /* @__PURE__ */ new Date(), entry.mtime); + } catch (er2) { + } + } + if (this[DOCHOWN](entry)) { + try { + import_node_fs4.default.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); + } catch (er2) { + } + } + done(); + entry.resume(); + } + [MKDIR](dir, mode) { + try { + return mkdirSync2(normalizeWindowsPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cwd: this.cwd, + mode + }); + } catch (er) { + return er; + } + } + [LINK](entry, linkpath, link, done) { + const ls = `${link}Sync`; + try { + import_node_fs4.default[ls](linkpath, String(entry.absolute)); + done(); + entry.resume(); + } catch (er) { + return this[ONERROR](er, entry); + } + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/extract.js +var extract_exports = {}; +__export(extract_exports, { + extract: () => extract +}); +var import_node_fs5, extractFileSync, extractFile, extract; +var init_extract = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/extract.js"() { + init_esm2(); + import_node_fs5 = __toESM(require("node:fs"), 1); + init_list(); + init_make_command(); + init_unpack(); + extractFileSync = (opt) => { + const u = new UnpackSync(opt); + const file = opt.file; + const stat = import_node_fs5.default.statSync(file); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const stream = new ReadStreamSync(file, { + readSize, + size: stat.size + }); + stream.pipe(u); + }; + extractFile = (opt, _) => { + const u = new Unpack(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + u.on("error", reject); + u.on("close", resolve); + import_node_fs5.default.stat(file, (er, stat) => { + if (er) { + reject(er); + } else { + const stream = new ReadStream(file, { + readSize, + size: stat.size + }); + stream.on("error", reject); + stream.pipe(u); + } + }); + }); + return p; + }; + extract = makeCommand(extractFileSync, extractFile, (opt) => new UnpackSync(opt), (opt) => new Unpack(opt), (opt, files) => { + if (files?.length) + filesFilter(opt, files); + }); + } +}); + +// .yarn/cache/v8-compile-cache-npm-2.4.0-5979f8e405-3878511925.zip/node_modules/v8-compile-cache/v8-compile-cache.js +var require_v8_compile_cache = __commonJS({ + ".yarn/cache/v8-compile-cache-npm-2.4.0-5979f8e405-3878511925.zip/node_modules/v8-compile-cache/v8-compile-cache.js"(exports2, module2) { + "use strict"; + var Module2 = require("module"); + var crypto = require("crypto"); + var fs17 = require("fs"); + var path16 = require("path"); + var vm = require("vm"); + var os3 = require("os"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var FileSystemBlobStore = class { + constructor(directory, prefix) { + const name2 = prefix ? slashEscape(prefix + ".") : ""; + this._blobFilename = path16.join(directory, name2 + "BLOB"); + this._mapFilename = path16.join(directory, name2 + "MAP"); + this._lockFilename = path16.join(directory, name2 + "LOCK"); + this._directory = directory; + this._load(); + } + has(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + return this._invalidationKeys[key] === invalidationKey; + } else if (hasOwnProperty.call(this._storedMap, key)) { + return this._storedMap[key][0] === invalidationKey; + } + return false; + } + get(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + if (this._invalidationKeys[key] === invalidationKey) { + return this._memoryBlobs[key]; + } + } else if (hasOwnProperty.call(this._storedMap, key)) { + const mapping = this._storedMap[key]; + if (mapping[0] === invalidationKey) { + return this._storedBlob.slice(mapping[1], mapping[2]); + } + } + } + set(key, invalidationKey, buffer) { + this._invalidationKeys[key] = invalidationKey; + this._memoryBlobs[key] = buffer; + this._dirty = true; + } + delete(key) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + this._dirty = true; + delete this._memoryBlobs[key]; + } + if (hasOwnProperty.call(this._invalidationKeys, key)) { + this._dirty = true; + delete this._invalidationKeys[key]; + } + if (hasOwnProperty.call(this._storedMap, key)) { + this._dirty = true; + delete this._storedMap[key]; + } + } + isDirty() { + return this._dirty; + } + save() { + const dump = this._getDump(); + const blobToStore = Buffer.concat(dump[0]); + const mapToStore = JSON.stringify(dump[1]); + try { + mkdirpSync(this._directory); + fs17.writeFileSync(this._lockFilename, "LOCK", { flag: "wx" }); + } catch (error) { + return false; + } + try { + fs17.writeFileSync(this._blobFilename, blobToStore); + fs17.writeFileSync(this._mapFilename, mapToStore); + } finally { + fs17.unlinkSync(this._lockFilename); + } + return true; + } + _load() { + try { + this._storedBlob = fs17.readFileSync(this._blobFilename); + this._storedMap = JSON.parse(fs17.readFileSync(this._mapFilename)); + } catch (e) { + this._storedBlob = Buffer.alloc(0); + this._storedMap = {}; + } + this._dirty = false; + this._memoryBlobs = {}; + this._invalidationKeys = {}; + } + _getDump() { + const buffers = []; + const newMap = {}; + let offset = 0; + function push2(key, invalidationKey, buffer) { + buffers.push(buffer); + newMap[key] = [invalidationKey, offset, offset + buffer.length]; + offset += buffer.length; + } + for (const key of Object.keys(this._memoryBlobs)) { + const buffer = this._memoryBlobs[key]; + const invalidationKey = this._invalidationKeys[key]; + push2(key, invalidationKey, buffer); + } + for (const key of Object.keys(this._storedMap)) { + if (hasOwnProperty.call(newMap, key)) continue; + const mapping = this._storedMap[key]; + const buffer = this._storedBlob.slice(mapping[1], mapping[2]); + push2(key, mapping[0], buffer); + } + return [buffers, newMap]; + } + }; + var NativeCompileCache = class { + constructor() { + this._cacheStore = null; + this._previousModuleCompile = null; + } + setCacheStore(cacheStore) { + this._cacheStore = cacheStore; + } + install() { + const self2 = this; + const hasRequireResolvePaths = typeof require.resolve.paths === "function"; + this._previousModuleCompile = Module2.prototype._compile; + Module2.prototype._compile = function(content, filename) { + const mod = this; + function require2(id) { + return mod.require(id); + } + function resolve(request, options) { + return Module2._resolveFilename(request, mod, false, options); + } + require2.resolve = resolve; + if (hasRequireResolvePaths) { + resolve.paths = function paths(request) { + return Module2._resolveLookupPaths(request, mod, true); + }; + } + require2.main = process.mainModule; + require2.extensions = Module2._extensions; + require2.cache = Module2._cache; + const dirname2 = path16.dirname(filename); + const compiledWrapper = self2._moduleCompile(filename, content); + const args = [mod.exports, require2, mod, filename, dirname2, process, global, Buffer]; + return compiledWrapper.apply(mod.exports, args); + }; + } + uninstall() { + Module2.prototype._compile = this._previousModuleCompile; + } + _moduleCompile(filename, content) { + var contLen = content.length; + if (contLen >= 2) { + if (content.charCodeAt(0) === 35 && content.charCodeAt(1) === 33) { + if (contLen === 2) { + content = ""; + } else { + var i = 2; + for (; i < contLen; ++i) { + var code2 = content.charCodeAt(i); + if (code2 === 10 || code2 === 13) break; + } + if (i === contLen) { + content = ""; + } else { + content = content.slice(i); + } + } + } + } + var wrapper = Module2.wrap(content); + var invalidationKey = crypto.createHash("sha1").update(content, "utf8").digest("hex"); + var buffer = this._cacheStore.get(filename, invalidationKey); + var script = new vm.Script(wrapper, { + filename, + lineOffset: 0, + displayErrors: true, + cachedData: buffer, + produceCachedData: true + }); + if (script.cachedDataProduced) { + this._cacheStore.set(filename, invalidationKey, script.cachedData); + } else if (script.cachedDataRejected) { + this._cacheStore.delete(filename); + } + var compiledWrapper = script.runInThisContext({ + filename, + lineOffset: 0, + columnOffset: 0, + displayErrors: true + }); + return compiledWrapper; + } + }; + function mkdirpSync(p_) { + _mkdirpSync(path16.resolve(p_), 511); + } + function _mkdirpSync(p, mode) { + try { + fs17.mkdirSync(p, mode); + } catch (err0) { + if (err0.code === "ENOENT") { + _mkdirpSync(path16.dirname(p)); + _mkdirpSync(p); + } else { + try { + const stat = fs17.statSync(p); + if (!stat.isDirectory()) { + throw err0; + } + } catch (err1) { + throw err0; + } + } + } + } + function slashEscape(str) { + const ESCAPE_LOOKUP = { + "\\": "zB", + ":": "zC", + "/": "zS", + "\0": "z0", + "z": "zZ" + }; + const ESCAPE_REGEX = /[\\:/\x00z]/g; + return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]); + } + function supportsCachedData() { + const script = new vm.Script('""', { produceCachedData: true }); + return script.cachedDataProduced === true; + } + function getCacheDir() { + const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR; + if (v8_compile_cache_cache_dir) { + return v8_compile_cache_cache_dir; + } + const dirname2 = typeof process.getuid === "function" ? "v8-compile-cache-" + process.getuid() : "v8-compile-cache"; + const arch = process.arch; + const version2 = typeof process.versions.v8 === "string" ? process.versions.v8 : typeof process.versions.chakracore === "string" ? "chakracore-" + process.versions.chakracore : "node-" + process.version; + const cacheDir = path16.join(os3.tmpdir(), dirname2, arch, version2); + return cacheDir; + } + function getMainName() { + const mainName = require.main && typeof require.main.filename === "string" ? require.main.filename : process.cwd(); + return mainName; + } + if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { + const cacheDir = getCacheDir(); + const prefix = getMainName(); + const blobStore = new FileSystemBlobStore(cacheDir, prefix); + const nativeCompileCache = new NativeCompileCache(); + nativeCompileCache.setCacheStore(blobStore); + nativeCompileCache.install(); + process.once("exit", () => { + if (blobStore.isDirty()) { + blobStore.save(); + } + nativeCompileCache.uninstall(); + }); + } + module2.exports.__TEST__ = { + FileSystemBlobStore, + NativeCompileCache, + mkdirpSync, + slashEscape, + supportsCachedData, + getCacheDir, + getMainName + }; + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/satisfies.js"(exports2, module2) { + "use strict"; + var Range3 = require_range(); + var satisfies = (version2, range, options) => { + try { + range = new Range3(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; + } +}); + +// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/posix.js +var require_posix = __commonJS({ + ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/posix.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = exports2.isexe = void 0; + var fs_1 = require("fs"); + var promises_1 = require("fs/promises"); + var isexe = async (path16, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await (0, promises_1.stat)(path16), options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.isexe = isexe; + var sync = (path16, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat((0, fs_1.statSync)(path16), options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.sync = sync; + var checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); + var checkMode = (stat, options) => { + const myUid = options.uid ?? process.getuid?.(); + const myGroups = options.groups ?? process.getgroups?.() ?? []; + const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; + if (myUid === void 0 || myGid === void 0) { + throw new Error("cannot get uid or gid"); + } + const groups = /* @__PURE__ */ new Set([myGid, ...myGroups]); + const mod = stat.mode; + const uid = stat.uid; + const gid = stat.gid; + const u = parseInt("100", 8); + const g = parseInt("010", 8); + const o = parseInt("001", 8); + const ug = u | g; + return !!(mod & o || mod & g && groups.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0); + }; + } +}); + +// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/win32.js +var require_win32 = __commonJS({ + ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/win32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = exports2.isexe = void 0; + var fs_1 = require("fs"); + var promises_1 = require("fs/promises"); + var isexe = async (path16, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await (0, promises_1.stat)(path16), path16, options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.isexe = isexe; + var sync = (path16, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat((0, fs_1.statSync)(path16), path16, options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.sync = sync; + var checkPathExt = (path16, options) => { + const { pathExt = process.env.PATHEXT || "" } = options; + const peSplit = pathExt.split(";"); + if (peSplit.indexOf("") !== -1) { + return true; + } + for (let i = 0; i < peSplit.length; i++) { + const p = peSplit[i].toLowerCase(); + const ext = path16.substring(path16.length - p.length).toLowerCase(); + if (p && ext === p) { + return true; + } + } + return false; + }; + var checkStat = (stat, path16, options) => stat.isFile() && checkPathExt(path16, options); + } +}); + +// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/options.js +var require_options = __commonJS({ + ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/index.js +var require_cjs = __commonJS({ + ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc2 = Object.getOwnPropertyDescriptor(m, k); + if (!desc2 || ("get" in desc2 ? !m.__esModule : desc2.writable || desc2.configurable)) { + desc2 = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc2); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = exports2.isexe = exports2.posix = exports2.win32 = void 0; + var posix = __importStar(require_posix()); + exports2.posix = posix; + var win322 = __importStar(require_win32()); + exports2.win32 = win322; + __exportStar(require_options(), exports2); + var platform5 = process.env._ISEXE_TEST_PLATFORM_ || process.platform; + var impl = platform5 === "win32" ? win322 : posix; + exports2.isexe = impl.isexe; + exports2.sync = impl.sync; + } +}); + +// .yarn/cache/which-npm-5.0.0-15aa39eb60-e556e4cd8b.zip/node_modules/which/lib/index.js +var require_lib = __commonJS({ + ".yarn/cache/which-npm-5.0.0-15aa39eb60-e556e4cd8b.zip/node_modules/which/lib/index.js"(exports2, module2) { + var { isexe, sync: isexeSync } = require_cjs(); + var { join: join3, delimiter, sep, posix } = require("path"); + var isWindows4 = process.platform === "win32"; + var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1")); + var rRel = new RegExp(`^\\.${rSlash.source}`); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, { + path: optPath = process.env.PATH, + pathExt: optPathExt = process.env.PATHEXT, + delimiter: optDelimiter = delimiter + }) => { + const pathEnv = cmd.match(rSlash) ? [""] : [ + // windows always checks the cwd first + ...isWindows4 ? [process.cwd()] : [], + ...(optPath || /* istanbul ignore next: very unusual */ + "").split(optDelimiter) + ]; + if (isWindows4) { + const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter); + const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]); + if (cmd.includes(".") && pathExt[0] !== "") { + pathExt.unshift(""); + } + return { pathEnv, pathExt, pathExtExe }; + } + return { pathEnv, pathExt: [""] }; + }; + var getPathPart = (raw2, cmd) => { + const pathPart = /^".*"$/.test(raw2) ? raw2.slice(1, -1) : raw2; + const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ""; + return prefix + join3(pathPart, cmd); + }; + var which3 = async (cmd, opt = {}) => { + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (const envPart of pathEnv) { + const p = getPathPart(envPart, cmd); + for (const ext of pathExt) { + const withExt = p + ext; + const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true }); + if (is) { + if (!opt.all) { + return withExt; + } + found.push(withExt); + } + } + } + if (opt.all && found.length) { + return found; + } + if (opt.nothrow) { + return null; + } + throw getNotFoundError(cmd); + }; + var whichSync = (cmd, opt = {}) => { + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (const pathEnvPart of pathEnv) { + const p = getPathPart(pathEnvPart, cmd); + for (const ext of pathExt) { + const withExt = p + ext; + const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }); + if (is) { + if (!opt.all) { + return withExt; + } + found.push(withExt); + } + } + } + if (opt.all && found.length) { + return found; + } + if (opt.nothrow) { + return null; + } + throw getNotFoundError(cmd); + }; + module2.exports = which3; + which3.sync = whichSync; + } +}); + +// .yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-b32f418ab3.zip/node_modules/is-windows/index.js +var require_is_windows = __commonJS({ + ".yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-b32f418ab3.zip/node_modules/is-windows/index.js"(exports2, module2) { + (function(factory) { + if (exports2 && typeof exports2 === "object" && typeof module2 !== "undefined") { + module2.exports = factory(); + } else if (typeof define === "function" && define.amd) { + define([], factory); + } else if (typeof window !== "undefined") { + window.isWindows = factory(); + } else if (typeof global !== "undefined") { + global.isWindows = factory(); + } else if (typeof self !== "undefined") { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } + })(function() { + "use strict"; + return function isWindows4() { + return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; + }); + } +}); + +// .yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-acdb425d51.zip/node_modules/cmd-extension/index.js +var require_cmd_extension = __commonJS({ + ".yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-acdb425d51.zip/node_modules/cmd-extension/index.js"(exports2, module2) { + "use strict"; + var path16 = require("path"); + var cmdExtension; + if (process.env.PATHEXT) { + cmdExtension = process.env.PATHEXT.split(path16.delimiter).find((ext) => ext.toUpperCase() === ".CMD"); + } + module2.exports = cmdExtension || ".cmd"; + } +}); + +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants2 = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform5 = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs17) { + if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs17); + } + if (!fs17.lutimes) { + patchLutimes(fs17); + } + fs17.chown = chownFix(fs17.chown); + fs17.fchown = chownFix(fs17.fchown); + fs17.lchown = chownFix(fs17.lchown); + fs17.chmod = chmodFix(fs17.chmod); + fs17.fchmod = chmodFix(fs17.fchmod); + fs17.lchmod = chmodFix(fs17.lchmod); + fs17.chownSync = chownFixSync(fs17.chownSync); + fs17.fchownSync = chownFixSync(fs17.fchownSync); + fs17.lchownSync = chownFixSync(fs17.lchownSync); + fs17.chmodSync = chmodFixSync(fs17.chmodSync); + fs17.fchmodSync = chmodFixSync(fs17.fchmodSync); + fs17.lchmodSync = chmodFixSync(fs17.lchmodSync); + fs17.stat = statFix(fs17.stat); + fs17.fstat = statFix(fs17.fstat); + fs17.lstat = statFix(fs17.lstat); + fs17.statSync = statFixSync(fs17.statSync); + fs17.fstatSync = statFixSync(fs17.fstatSync); + fs17.lstatSync = statFixSync(fs17.lstatSync); + if (fs17.chmod && !fs17.lchmod) { + fs17.lchmod = function(path16, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs17.lchmodSync = function() { + }; + } + if (fs17.chown && !fs17.lchown) { + fs17.lchown = function(path16, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs17.lchownSync = function() { + }; + } + if (platform5 === "win32") { + fs17.rename = typeof fs17.rename !== "function" ? fs17.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { + setTimeout(function() { + fs17.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs17.rename); + } + fs17.read = typeof fs17.read !== "function" ? fs17.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs17, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs17, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs17.read); + fs17.readSync = typeof fs17.readSync !== "function" ? fs17.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs17, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs17.readSync); + function patchLchmod(fs18) { + fs18.lchmod = function(path16, mode, callback) { + fs18.open( + path16, + constants2.O_WRONLY | constants2.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs18.fchmod(fd, mode, function(err2) { + fs18.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs18.lchmodSync = function(path16, mode) { + var fd = fs18.openSync(path16, constants2.O_WRONLY | constants2.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs18.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs18.closeSync(fd); + } catch (er) { + } + } else { + fs18.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs18) { + if (constants2.hasOwnProperty("O_SYMLINK") && fs18.futimes) { + fs18.lutimes = function(path16, at, mt, cb) { + fs18.open(path16, constants2.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs18.futimes(fd, at, mt, function(er2) { + fs18.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs18.lutimesSync = function(path16, at, mt) { + var fd = fs18.openSync(path16, constants2.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs18.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs18.closeSync(fd); + } catch (er) { + } + } else { + fs18.closeSync(fd); + } + } + return ret; + }; + } else if (fs18.futimes) { + fs18.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs18.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs17, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs17, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs17, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs17, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs17, target, options, callback) : orig.call(fs17, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs17, target, options) : orig.call(fs17, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream2 = require("stream").Stream; + module2.exports = legacy; + function legacy(fs17) { + return { + ReadStream: ReadStream2, + WriteStream: WriteStream2 + }; + function ReadStream2(path16, options) { + if (!(this instanceof ReadStream2)) return new ReadStream2(path16, options); + Stream2.call(this); + var self2 = this; + this.path = path16; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs17.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream2(path16, options) { + if (!(this instanceof WriteStream2)) return new WriteStream2(path16, options); + Stream2.call(this); + this.path = path16; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs17.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs17 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop3() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug2 = noop3; + if (util.debuglog) + debug2 = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug2 = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs17[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs17, queue); + fs17.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs17, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs17.close); + fs17.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs17, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs17.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug2(fs17[gracefulQueue]); + require("assert").equal(fs17[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs17[gracefulQueue]); + } + module2.exports = patch(clone(fs17)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs17.__patched) { + module2.exports = patch(fs17); + fs17.__patched = true; + } + function patch(fs18) { + polyfills(fs18); + fs18.gracefulify = patch; + fs18.createReadStream = createReadStream; + fs18.createWriteStream = createWriteStream; + var fs$readFile = fs18.readFile; + fs18.readFile = readFile; + function readFile(path16, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path16, options, cb); + function go$readFile(path17, options2, cb2, startTime) { + return fs$readFile(path17, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path17, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs18.writeFile; + fs18.writeFile = writeFile; + function writeFile(path16, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path16, data, options, cb); + function go$writeFile(path17, data2, options2, cb2, startTime) { + return fs$writeFile(path17, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs18.appendFile; + if (fs$appendFile) + fs18.appendFile = appendFile; + function appendFile(path16, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path16, data, options, cb); + function go$appendFile(path17, data2, options2, cb2, startTime) { + return fs$appendFile(path17, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs18.copyFile; + if (fs$copyFile) + fs18.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs18.readdir; + fs18.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path16, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path17, options2, cb2, startTime) { + return fs$readdir(path17, fs$readdirCallback( + path17, + options2, + cb2, + startTime + )); + } : function go$readdir2(path17, options2, cb2, startTime) { + return fs$readdir(path17, options2, fs$readdirCallback( + path17, + options2, + cb2, + startTime + )); + }; + return go$readdir(path16, options, cb); + function fs$readdirCallback(path17, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path17, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs18); + ReadStream2 = legStreams.ReadStream; + WriteStream2 = legStreams.WriteStream; + } + var fs$ReadStream = fs18.ReadStream; + if (fs$ReadStream) { + ReadStream2.prototype = Object.create(fs$ReadStream.prototype); + ReadStream2.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs18.WriteStream; + if (fs$WriteStream) { + WriteStream2.prototype = Object.create(fs$WriteStream.prototype); + WriteStream2.prototype.open = WriteStream$open; + } + Object.defineProperty(fs18, "ReadStream", { + get: function() { + return ReadStream2; + }, + set: function(val) { + ReadStream2 = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs18, "WriteStream", { + get: function() { + return WriteStream2; + }, + set: function(val) { + WriteStream2 = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream2; + Object.defineProperty(fs18, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream2; + Object.defineProperty(fs18, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream2(path16, options) { + if (this instanceof ReadStream2) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream2.apply(Object.create(ReadStream2.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream2(path16, options) { + if (this instanceof WriteStream2) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream2.apply(Object.create(WriteStream2.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path16, options) { + return new fs18.ReadStream(path16, options); + } + function createWriteStream(path16, options) { + return new fs18.WriteStream(path16, options); + } + var fs$open = fs18.open; + fs18.open = open; + function open(path16, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path16, flags, mode, cb); + function go$open(path17, flags2, mode2, cb2, startTime) { + return fs$open(path17, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path17, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs18; + } + function enqueue(elem) { + debug2("ENQUEUE", elem[0].name, elem[1]); + fs17[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs17[gracefulQueue].length; ++i) { + if (fs17[gracefulQueue][i].length > 2) { + fs17[gracefulQueue][i][3] = now; + fs17[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs17[gracefulQueue].length === 0) + return; + var elem = fs17[gracefulQueue].shift(); + var fn2 = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug2("RETRY", fn2.name, args); + fn2.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug2("TIMEOUT", fn2.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug2("RETRY", fn2.name, args); + fn2.apply(null, args.concat([startTime])); + } else { + fs17[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// .yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-ba1442ba1e.zip/node_modules/@zkochan/cmd-shim/index.js +var require_cmd_shim = __commonJS({ + ".yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-ba1442ba1e.zip/node_modules/@zkochan/cmd-shim/index.js"(exports2, module2) { + "use strict"; + cmdShim2.ifExists = cmdShimIfExists; + var util_1 = require("util"); + var path16 = require("path"); + var isWindows4 = require_is_windows(); + var CMD_EXTENSION = require_cmd_extension(); + var shebangExpr = /^#!\s*(?:\/usr\/bin\/env(?:\s+-S\s*)?)?\s*([^ \t]+)(.*)$/; + var DEFAULT_OPTIONS = { + // Create PowerShell file by default if the option hasn't been specified + createPwshFile: true, + createCmdFile: isWindows4(), + fs: require_graceful_fs() + }; + var extensionToProgramMap = /* @__PURE__ */ new Map([ + [".js", "node"], + [".cjs", "node"], + [".mjs", "node"], + [".cmd", "cmd"], + [".bat", "cmd"], + [".ps1", "pwsh"], + [".sh", "sh"] + ]); + function ingestOptions(opts) { + const opts_ = { ...DEFAULT_OPTIONS, ...opts }; + const fs17 = opts_.fs; + opts_.fs_ = { + chmod: fs17.chmod ? (0, util_1.promisify)(fs17.chmod) : (async () => { + }), + mkdir: (0, util_1.promisify)(fs17.mkdir), + readFile: (0, util_1.promisify)(fs17.readFile), + stat: (0, util_1.promisify)(fs17.stat), + unlink: (0, util_1.promisify)(fs17.unlink), + writeFile: (0, util_1.promisify)(fs17.writeFile) + }; + return opts_; + } + async function cmdShim2(src, to, opts) { + const opts_ = ingestOptions(opts); + await cmdShim_(src, to, opts_); + } + function cmdShimIfExists(src, to, opts) { + return cmdShim2(src, to, opts).catch(() => { + }); + } + function rm(path17, opts) { + return opts.fs_.unlink(path17).catch(() => { + }); + } + async function cmdShim_(src, to, opts) { + const srcRuntimeInfo = await searchScriptRuntime(src, opts); + await writeShimsPreCommon(to, opts); + return writeAllShims(src, to, srcRuntimeInfo, opts); + } + function writeShimsPreCommon(target, opts) { + return opts.fs_.mkdir(path16.dirname(target), { recursive: true }); + } + function writeAllShims(src, to, srcRuntimeInfo, opts) { + const opts_ = ingestOptions(opts); + const generatorAndExts = [{ generator: generateShShim, extension: "" }]; + if (opts_.createCmdFile) { + generatorAndExts.push({ generator: generateCmdShim, extension: CMD_EXTENSION }); + } + if (opts_.createPwshFile) { + generatorAndExts.push({ generator: generatePwshShim, extension: ".ps1" }); + } + return Promise.all(generatorAndExts.map((generatorAndExt) => writeShim(src, to + generatorAndExt.extension, srcRuntimeInfo, generatorAndExt.generator, opts_))); + } + function writeShimPre(target, opts) { + return rm(target, opts); + } + function writeShimPost(target, opts) { + return chmodShim(target, opts); + } + async function searchScriptRuntime(target, opts) { + try { + const data = await opts.fs_.readFile(target, "utf8"); + const firstLine = data.trim().split(/\r*\n/)[0]; + const shebang = firstLine.match(shebangExpr); + if (!shebang) { + const targetExtension = path16.extname(target).toLowerCase(); + return { + // undefined if extension is unknown but it's converted to null. + program: extensionToProgramMap.get(targetExtension) || null, + additionalArgs: "" + }; + } + return { + program: shebang[1], + additionalArgs: shebang[2] + }; + } catch (err) { + if (!isWindows4() || err.code !== "ENOENT") + throw err; + if (await opts.fs_.stat(`${target}${getExeExtension()}`)) { + return { + program: null, + additionalArgs: "" + }; + } + throw err; + } + } + function getExeExtension() { + let cmdExtension; + if (process.env.PATHEXT) { + cmdExtension = process.env.PATHEXT.split(path16.delimiter).find((ext) => ext.toLowerCase() === ".exe"); + } + return cmdExtension || ".exe"; + } + async function writeShim(src, to, srcRuntimeInfo, generateShimScript, opts) { + const defaultArgs = opts.preserveSymlinks ? "--preserve-symlinks" : ""; + const args = [srcRuntimeInfo.additionalArgs, defaultArgs].filter((arg) => arg).join(" "); + opts = Object.assign({}, opts, { + prog: srcRuntimeInfo.program, + args + }); + await writeShimPre(to, opts); + await opts.fs_.writeFile(to, generateShimScript(src, to, opts), "utf8"); + return writeShimPost(to, opts); + } + function generateCmdShim(src, to, opts) { + const shTarget = path16.relative(path16.dirname(to), src); + let target = shTarget.split("/").join("\\"); + const quotedPathToTarget = path16.isAbsolute(target) ? `"${target}"` : `"%~dp0\\${target}"`; + let longProg; + let prog = opts.prog; + let args = opts.args || ""; + const nodePath = normalizePathEnvVar(opts.nodePath).win32; + const prependToPath = normalizePathEnvVar(opts.prependToPath).win32; + if (!prog) { + prog = quotedPathToTarget; + args = ""; + target = ""; + } else if (prog === "node" && opts.nodeExecPath) { + prog = `"${opts.nodeExecPath}"`; + target = quotedPathToTarget; + } else { + longProg = `"%~dp0\\${prog}.exe"`; + target = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let cmd = "@SETLOCAL\r\n"; + if (prependToPath) { + cmd += `@SET "PATH=${prependToPath}:%PATH%"\r +`; + } + if (nodePath) { + cmd += `@IF NOT DEFINED NODE_PATH (\r + @SET "NODE_PATH=${nodePath}"\r +) ELSE (\r + @SET "NODE_PATH=${nodePath};%NODE_PATH%"\r +)\r +`; + } + if (longProg) { + cmd += `@IF EXIST ${longProg} (\r + ${longProg} ${args} ${target} ${progArgs}%*\r +) ELSE (\r + @SET PATHEXT=%PATHEXT:;.JS;=;%\r + ${prog} ${args} ${target} ${progArgs}%*\r +)\r +`; + } else { + cmd += `@${prog} ${args} ${target} ${progArgs}%*\r +`; + } + return cmd; + } + function generateShShim(src, to, opts) { + let shTarget = path16.relative(path16.dirname(to), src); + let shProg = opts.prog && opts.prog.split("\\").join("/"); + let shLongProg; + shTarget = shTarget.split("\\").join("/"); + const quotedPathToTarget = path16.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; + let args = opts.args || ""; + const shNodePath = normalizePathEnvVar(opts.nodePath).posix; + if (!shProg) { + shProg = quotedPathToTarget; + args = ""; + shTarget = ""; + } else if (opts.prog === "node" && opts.nodeExecPath) { + shProg = `"${opts.nodeExecPath}"`; + shTarget = quotedPathToTarget; + } else { + shLongProg = `"$basedir/${opts.prog}"`; + shTarget = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let sh = `#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") + +case \`uname\` in + *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; +esac + +`; + if (opts.prependToPath) { + sh += `export PATH="${opts.prependToPath}:$PATH" +`; + } + if (shNodePath) { + sh += `if [ -z "$NODE_PATH" ]; then + export NODE_PATH="${shNodePath}" +else + export NODE_PATH="${shNodePath}:$NODE_PATH" +fi +`; + } + if (shLongProg) { + sh += `if [ -x ${shLongProg} ]; then + exec ${shLongProg} ${args} ${shTarget} ${progArgs}"$@" +else + exec ${shProg} ${args} ${shTarget} ${progArgs}"$@" +fi +`; + } else { + sh += `${shProg} ${args} ${shTarget} ${progArgs}"$@" +exit $? +`; + } + return sh; + } + function generatePwshShim(src, to, opts) { + let shTarget = path16.relative(path16.dirname(to), src); + const shProg = opts.prog && opts.prog.split("\\").join("/"); + let pwshProg = shProg && `"${shProg}$exe"`; + let pwshLongProg; + shTarget = shTarget.split("\\").join("/"); + const quotedPathToTarget = path16.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; + let args = opts.args || ""; + let normalizedNodePathEnvVar = normalizePathEnvVar(opts.nodePath); + const nodePath = normalizedNodePathEnvVar.win32; + const shNodePath = normalizedNodePathEnvVar.posix; + let normalizedPrependPathEnvVar = normalizePathEnvVar(opts.prependToPath); + const prependPath = normalizedPrependPathEnvVar.win32; + const shPrependPath = normalizedPrependPathEnvVar.posix; + if (!pwshProg) { + pwshProg = quotedPathToTarget; + args = ""; + shTarget = ""; + } else if (opts.prog === "node" && opts.nodeExecPath) { + pwshProg = `"${opts.nodeExecPath}"`; + shTarget = quotedPathToTarget; + } else { + pwshLongProg = `"$basedir/${opts.prog}$exe"`; + shTarget = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let pwsh = `#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +${nodePath || prependPath ? '$pathsep=":"\n' : ""}${nodePath ? `$env_node_path=$env:NODE_PATH +$new_node_path="${nodePath}" +` : ""}${prependPath ? `$env_path=$env:PATH +$prepend_path="${prependPath}" +` : ""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +${nodePath || prependPath ? ' $pathsep=";"\n' : ""}}`; + if (shNodePath || shPrependPath) { + pwsh += ` else { +${shNodePath ? ` $new_node_path="${shNodePath}" +` : ""}${shPrependPath ? ` $prepend_path="${shPrependPath}" +` : ""}} +`; + } + if (shNodePath) { + pwsh += `if ([string]::IsNullOrEmpty($env_node_path)) { + $env:NODE_PATH=$new_node_path +} else { + $env:NODE_PATH="$new_node_path$pathsep$env_node_path" +} +`; + } + if (opts.prependToPath) { + pwsh += ` +$env:PATH="$prepend_path$pathsep$env:PATH" +`; + } + if (pwshLongProg) { + pwsh += ` +$ret=0 +if (Test-Path ${pwshLongProg}) { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${pwshLongProg} ${args} ${shTarget} ${progArgs}$args + } else { + & ${pwshLongProg} ${args} ${shTarget} ${progArgs}$args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${pwshProg} ${args} ${shTarget} ${progArgs}$args + } else { + & ${pwshProg} ${args} ${shTarget} ${progArgs}$args + } + $ret=$LASTEXITCODE +} +${nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}${prependPath ? "$env:PATH=$env_path\n" : ""}exit $ret +`; + } else { + pwsh += ` +# Support pipeline input +if ($MyInvocation.ExpectingInput) { + $input | & ${pwshProg} ${args} ${shTarget} ${progArgs}$args +} else { + & ${pwshProg} ${args} ${shTarget} ${progArgs}$args +} +${nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}${prependPath ? "$env:PATH=$env_path\n" : ""}exit $LASTEXITCODE +`; + } + return pwsh; + } + function chmodShim(to, opts) { + return opts.fs_.chmod(to, 493); + } + function normalizePathEnvVar(nodePath) { + if (!nodePath || !nodePath.length) { + return { + win32: "", + posix: "" + }; + } + let split = typeof nodePath === "string" ? nodePath.split(path16.delimiter) : Array.from(nodePath); + let result = {}; + for (let i = 0; i < split.length; i++) { + const win322 = split[i].split("/").join("\\"); + const posix = isWindows4() ? split[i].split("\\").join("/").replace(/^([^:\\/]*):/, (_, $1) => `/mnt/${$1.toLowerCase()}`) : split[i]; + result.win32 = result.win32 ? `${result.win32};${win322}` : win322; + result.posix = result.posix ? `${result.posix}:${posix}` : posix; + result[i] = { win32: win322, posix }; + } + return result; + } + module2.exports = cmdShim2; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mode-fix.js +var modeFix; +var init_mode_fix = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mode-fix.js"() { + modeFix = (mode, isDir, portable) => { + mode &= 4095; + if (portable) { + mode = (mode | 384) & ~18; + } + if (isDir) { + if (mode & 256) { + mode |= 64; + } + if (mode & 32) { + mode |= 8; + } + if (mode & 4) { + mode |= 1; + } + } + return mode; + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/write-entry.js +var import_fs11, import_path9, prefixPath, maxReadSize, PROCESS, FILE2, DIRECTORY2, SYMLINK2, HARDLINK2, HEADER, READ2, LSTAT, ONLSTAT, ONREAD, ONREADLINK, OPENFILE, ONOPENFILE, CLOSE, MODE, AWAITDRAIN, ONDRAIN, PREFIX, WriteEntry, WriteEntrySync, WriteEntryTar, getType; +var init_write_entry = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/write-entry.js"() { + import_fs11 = __toESM(require("fs"), 1); + init_esm(); + import_path9 = __toESM(require("path"), 1); + init_header(); + init_mode_fix(); + init_normalize_windows_path(); + init_options(); + init_pax(); + init_strip_absolute_path(); + init_strip_trailing_slashes(); + init_warn_method(); + init_winchars(); + prefixPath = (path16, prefix) => { + if (!prefix) { + return normalizeWindowsPath(path16); + } + path16 = normalizeWindowsPath(path16).replace(/^\.(\/|$)/, ""); + return stripTrailingSlashes(prefix) + "/" + path16; + }; + maxReadSize = 16 * 1024 * 1024; + PROCESS = Symbol("process"); + FILE2 = Symbol("file"); + DIRECTORY2 = Symbol("directory"); + SYMLINK2 = Symbol("symlink"); + HARDLINK2 = Symbol("hardlink"); + HEADER = Symbol("header"); + READ2 = Symbol("read"); + LSTAT = Symbol("lstat"); + ONLSTAT = Symbol("onlstat"); + ONREAD = Symbol("onread"); + ONREADLINK = Symbol("onreadlink"); + OPENFILE = Symbol("openfile"); + ONOPENFILE = Symbol("onopenfile"); + CLOSE = Symbol("close"); + MODE = Symbol("mode"); + AWAITDRAIN = Symbol("awaitDrain"); + ONDRAIN = Symbol("ondrain"); + PREFIX = Symbol("prefix"); + WriteEntry = class extends Minipass { + path; + portable; + myuid = process.getuid && process.getuid() || 0; + // until node has builtin pwnam functions, this'll have to do + myuser = process.env.USER || ""; + maxReadSize; + linkCache; + statCache; + preservePaths; + cwd; + strict; + mtime; + noPax; + noMtime; + prefix; + fd; + blockLen = 0; + blockRemain = 0; + buf; + pos = 0; + remain = 0; + length = 0; + offset = 0; + win32; + absolute; + header; + type; + linkpath; + stat; + onWriteEntry; + #hadError = false; + constructor(p, opt_ = {}) { + const opt = dealias(opt_); + super(); + this.path = normalizeWindowsPath(p); + this.portable = !!opt.portable; + this.maxReadSize = opt.maxReadSize || maxReadSize; + this.linkCache = opt.linkCache || /* @__PURE__ */ new Map(); + this.statCache = opt.statCache || /* @__PURE__ */ new Map(); + this.preservePaths = !!opt.preservePaths; + this.cwd = normalizeWindowsPath(opt.cwd || process.cwd()); + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.mtime = opt.mtime; + this.prefix = opt.prefix ? normalizeWindowsPath(opt.prefix) : void 0; + this.onWriteEntry = opt.onWriteEntry; + if (typeof opt.onwarn === "function") { + this.on("warn", opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path); + if (root && typeof stripped === "string") { + this.path = stripped; + pathWarn = root; + } + } + this.win32 = !!opt.win32 || process.platform === "win32"; + if (this.win32) { + this.path = decode(this.path.replace(/\\/g, "/")); + p = p.replace(/\\/g, "/"); + } + this.absolute = normalizeWindowsPath(opt.absolute || import_path9.default.resolve(this.cwd, p)); + if (this.path === "") { + this.path = "./"; + } + if (pathWarn) { + this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path + }); + } + const cs = this.statCache.get(this.absolute); + if (cs) { + this[ONLSTAT](cs); + } else { + this[LSTAT](); + } + } + warn(code2, message, data = {}) { + return warnMethod(this, code2, message, data); + } + emit(ev, ...data) { + if (ev === "error") { + this.#hadError = true; + } + return super.emit(ev, ...data); + } + [LSTAT]() { + import_fs11.default.lstat(this.absolute, (er, stat) => { + if (er) { + return this.emit("error", er); + } + this[ONLSTAT](stat); + }); + } + [ONLSTAT](stat) { + this.statCache.set(this.absolute, stat); + this.stat = stat; + if (!stat.isFile()) { + stat.size = 0; + } + this.type = getType(stat); + this.emit("stat", stat); + this[PROCESS](); + } + [PROCESS]() { + switch (this.type) { + case "File": + return this[FILE2](); + case "Directory": + return this[DIRECTORY2](); + case "SymbolicLink": + return this[SYMLINK2](); + // unsupported types are ignored. + default: + return this.end(); + } + } + [MODE](mode) { + return modeFix(mode, this.type === "Directory", this.portable); + } + [PREFIX](path16) { + return prefixPath(path16, this.prefix); + } + [HEADER]() { + if (!this.stat) { + throw new Error("cannot write header before stat"); + } + if (this.type === "Directory" && this.portable) { + this.noMtime = true; + } + this.onWriteEntry?.(this); + this.header = new Header({ + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this[MODE](this.stat.mode), + uid: this.portable ? void 0 : this.stat.uid, + gid: this.portable ? void 0 : this.stat.gid, + size: this.stat.size, + mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, + /* c8 ignore next */ + type: this.type === "Unsupported" ? void 0 : this.type, + uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", + atime: this.portable ? void 0 : this.stat.atime, + ctime: this.portable ? void 0 : this.stat.ctime + }); + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? void 0 : this.header.atime, + ctime: this.portable ? void 0 : this.header.ctime, + gid: this.portable ? void 0 : this.header.gid, + mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, + size: this.header.size, + uid: this.portable ? void 0 : this.header.uid, + uname: this.portable ? void 0 : this.header.uname, + dev: this.portable ? void 0 : this.stat.dev, + ino: this.portable ? void 0 : this.stat.ino, + nlink: this.portable ? void 0 : this.stat.nlink + }).encode()); + } + const block = this.header?.block; + if (!block) { + throw new Error("failed to encode header"); + } + super.write(block); + } + [DIRECTORY2]() { + if (!this.stat) { + throw new Error("cannot create directory entry without stat"); + } + if (this.path.slice(-1) !== "/") { + this.path += "/"; + } + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [SYMLINK2]() { + import_fs11.default.readlink(this.absolute, (er, linkpath) => { + if (er) { + return this.emit("error", er); + } + this[ONREADLINK](linkpath); + }); + } + [ONREADLINK](linkpath) { + this.linkpath = normalizeWindowsPath(linkpath); + this[HEADER](); + this.end(); + } + [HARDLINK2](linkpath) { + if (!this.stat) { + throw new Error("cannot create link entry without stat"); + } + this.type = "Link"; + this.linkpath = normalizeWindowsPath(import_path9.default.relative(this.cwd, linkpath)); + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [FILE2]() { + if (!this.stat) { + throw new Error("cannot create file entry without stat"); + } + if (this.stat.nlink > 1) { + const linkKey = `${this.stat.dev}:${this.stat.ino}`; + const linkpath = this.linkCache.get(linkKey); + if (linkpath?.indexOf(this.cwd) === 0) { + return this[HARDLINK2](linkpath); + } + this.linkCache.set(linkKey, this.absolute); + } + this[HEADER](); + if (this.stat.size === 0) { + return this.end(); + } + this[OPENFILE](); + } + [OPENFILE]() { + import_fs11.default.open(this.absolute, "r", (er, fd) => { + if (er) { + return this.emit("error", er); + } + this[ONOPENFILE](fd); + }); + } + [ONOPENFILE](fd) { + this.fd = fd; + if (this.#hadError) { + return this[CLOSE](); + } + if (!this.stat) { + throw new Error("should stat before calling onopenfile"); + } + this.blockLen = 512 * Math.ceil(this.stat.size / 512); + this.blockRemain = this.blockLen; + const bufLen = Math.min(this.blockLen, this.maxReadSize); + this.buf = Buffer.allocUnsafe(bufLen); + this.offset = 0; + this.pos = 0; + this.remain = this.stat.size; + this.length = this.buf.length; + this[READ2](); + } + [READ2]() { + const { fd, buf, offset, length, pos: pos2 } = this; + if (fd === void 0 || buf === void 0) { + throw new Error("cannot read file without first opening"); + } + import_fs11.default.read(fd, buf, offset, length, pos2, (er, bytesRead) => { + if (er) { + return this[CLOSE](() => this.emit("error", er)); + } + this[ONREAD](bytesRead); + }); + } + /* c8 ignore start */ + [CLOSE](cb = () => { + }) { + if (this.fd !== void 0) + import_fs11.default.close(this.fd, cb); + } + [ONREAD](bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { + const er = Object.assign(new Error("encountered unexpected EOF"), { + path: this.absolute, + syscall: "read", + code: "EOF" + }); + return this[CLOSE](() => this.emit("error", er)); + } + if (bytesRead > this.remain) { + const er = Object.assign(new Error("did not encounter expected EOF"), { + path: this.absolute, + syscall: "read", + code: "EOF" + }); + return this[CLOSE](() => this.emit("error", er)); + } + if (!this.buf) { + throw new Error("should have created buffer prior to reading"); + } + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0; + bytesRead++; + this.remain++; + } + } + const chunk = this.offset === 0 && bytesRead === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + bytesRead); + const flushed = this.write(chunk); + if (!flushed) { + this[AWAITDRAIN](() => this[ONDRAIN]()); + } else { + this[ONDRAIN](); + } + } + [AWAITDRAIN](cb) { + this.once("drain", cb); + } + write(chunk, encoding, cb) { + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, typeof encoding === "string" ? encoding : "utf8"); + } + if (this.blockRemain < chunk.length) { + const er = Object.assign(new Error("writing more data than expected"), { + path: this.absolute + }); + return this.emit("error", er); + } + this.remain -= chunk.length; + this.blockRemain -= chunk.length; + this.pos += chunk.length; + this.offset += chunk.length; + return super.write(chunk, null, cb); + } + [ONDRAIN]() { + if (!this.remain) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + return this[CLOSE]((er) => er ? this.emit("error", er) : this.end()); + } + if (!this.buf) { + throw new Error("buffer lost somehow in ONDRAIN"); + } + if (this.offset >= this.length) { + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); + this.offset = 0; + } + this.length = this.buf.length - this.offset; + this[READ2](); + } + }; + WriteEntrySync = class extends WriteEntry { + sync = true; + [LSTAT]() { + this[ONLSTAT](import_fs11.default.lstatSync(this.absolute)); + } + [SYMLINK2]() { + this[ONREADLINK](import_fs11.default.readlinkSync(this.absolute)); + } + [OPENFILE]() { + this[ONOPENFILE](import_fs11.default.openSync(this.absolute, "r")); + } + [READ2]() { + let threw = true; + try { + const { fd, buf, offset, length, pos: pos2 } = this; + if (fd === void 0 || buf === void 0) { + throw new Error("fd and buf must be set in READ method"); + } + const bytesRead = import_fs11.default.readSync(fd, buf, offset, length, pos2); + this[ONREAD](bytesRead); + threw = false; + } finally { + if (threw) { + try { + this[CLOSE](() => { + }); + } catch (er) { + } + } + } + } + [AWAITDRAIN](cb) { + cb(); + } + /* c8 ignore start */ + [CLOSE](cb = () => { + }) { + if (this.fd !== void 0) + import_fs11.default.closeSync(this.fd); + cb(); + } + }; + WriteEntryTar = class extends Minipass { + blockLen = 0; + blockRemain = 0; + buf = 0; + pos = 0; + remain = 0; + length = 0; + preservePaths; + portable; + strict; + noPax; + noMtime; + readEntry; + type; + prefix; + path; + mode; + uid; + gid; + uname; + gname; + header; + mtime; + atime; + ctime; + linkpath; + size; + onWriteEntry; + warn(code2, message, data = {}) { + return warnMethod(this, code2, message, data); + } + constructor(readEntry, opt_ = {}) { + const opt = dealias(opt_); + super(); + this.preservePaths = !!opt.preservePaths; + this.portable = !!opt.portable; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.onWriteEntry = opt.onWriteEntry; + this.readEntry = readEntry; + const { type } = readEntry; + if (type === "Unsupported") { + throw new Error("writing entry that should be ignored"); + } + this.type = type; + if (this.type === "Directory" && this.portable) { + this.noMtime = true; + } + this.prefix = opt.prefix; + this.path = normalizeWindowsPath(readEntry.path); + this.mode = readEntry.mode !== void 0 ? this[MODE](readEntry.mode) : void 0; + this.uid = this.portable ? void 0 : readEntry.uid; + this.gid = this.portable ? void 0 : readEntry.gid; + this.uname = this.portable ? void 0 : readEntry.uname; + this.gname = this.portable ? void 0 : readEntry.gname; + this.size = readEntry.size; + this.mtime = this.noMtime ? void 0 : opt.mtime || readEntry.mtime; + this.atime = this.portable ? void 0 : readEntry.atime; + this.ctime = this.portable ? void 0 : readEntry.ctime; + this.linkpath = readEntry.linkpath !== void 0 ? normalizeWindowsPath(readEntry.linkpath) : void 0; + if (typeof opt.onwarn === "function") { + this.on("warn", opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path); + if (root && typeof stripped === "string") { + this.path = stripped; + pathWarn = root; + } + } + this.remain = readEntry.size; + this.blockRemain = readEntry.startBlockSize; + this.onWriteEntry?.(this); + this.header = new Header({ + path: this[PREFIX](this.path), + linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this.mode, + uid: this.portable ? void 0 : this.uid, + gid: this.portable ? void 0 : this.gid, + size: this.size, + mtime: this.noMtime ? void 0 : this.mtime, + type: this.type, + uname: this.portable ? void 0 : this.uname, + atime: this.portable ? void 0 : this.atime, + ctime: this.portable ? void 0 : this.ctime + }); + if (pathWarn) { + this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path + }); + } + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? void 0 : this.atime, + ctime: this.portable ? void 0 : this.ctime, + gid: this.portable ? void 0 : this.gid, + mtime: this.noMtime ? void 0 : this.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, + size: this.size, + uid: this.portable ? void 0 : this.uid, + uname: this.portable ? void 0 : this.uname, + dev: this.portable ? void 0 : this.readEntry.dev, + ino: this.portable ? void 0 : this.readEntry.ino, + nlink: this.portable ? void 0 : this.readEntry.nlink + }).encode()); + } + const b = this.header?.block; + if (!b) + throw new Error("failed to encode header"); + super.write(b); + readEntry.pipe(this); + } + [PREFIX](path16) { + return prefixPath(path16, this.prefix); + } + [MODE](mode) { + return modeFix(mode, this.type === "Directory", this.portable); + } + write(chunk, encoding, cb) { + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, typeof encoding === "string" ? encoding : "utf8"); + } + const writeLen = chunk.length; + if (writeLen > this.blockRemain) { + throw new Error("writing more to entry than is appropriate"); + } + this.blockRemain -= writeLen; + return super.write(chunk, cb); + } + end(chunk, encoding, cb) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + if (typeof chunk === "function") { + cb = chunk; + encoding = void 0; + chunk = void 0; + } + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding ?? "utf8"); + } + if (cb) + this.once("finish", cb); + chunk ? super.end(chunk, cb) : super.end(cb); + return this; + } + }; + getType = (stat) => stat.isFile() ? "File" : stat.isDirectory() ? "Directory" : stat.isSymbolicLink() ? "SymbolicLink" : "Unsupported"; + } +}); + +// .yarn/cache/yallist-npm-5.0.0-8732dd9f1c-a499c81ce6.zip/node_modules/yallist/dist/esm/index.js +function insertAfter(self2, node, value) { + const prev = node; + const next = node ? node.next : self2.head; + const inserted = new Node(value, prev, next, self2); + if (inserted.next === void 0) { + self2.tail = inserted; + } + if (inserted.prev === void 0) { + self2.head = inserted; + } + self2.length++; + return inserted; +} +function push(self2, item) { + self2.tail = new Node(item, self2.tail, void 0, self2); + if (!self2.head) { + self2.head = self2.tail; + } + self2.length++; +} +function unshift(self2, item) { + self2.head = new Node(item, void 0, self2.head, self2); + if (!self2.tail) { + self2.tail = self2.head; + } + self2.length++; +} +var Yallist, Node; +var init_esm5 = __esm({ + ".yarn/cache/yallist-npm-5.0.0-8732dd9f1c-a499c81ce6.zip/node_modules/yallist/dist/esm/index.js"() { + Yallist = class _Yallist { + tail; + head; + length = 0; + static create(list2 = []) { + return new _Yallist(list2); + } + constructor(list2 = []) { + for (const item of list2) { + this.push(item); + } + } + *[Symbol.iterator]() { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; + } + } + removeNode(node) { + if (node.list !== this) { + throw new Error("removing node which does not belong to this list"); + } + const next = node.next; + const prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; + } + this.length--; + node.next = void 0; + node.prev = void 0; + node.list = void 0; + return next; + } + unshiftNode(node) { + if (node === this.head) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + const head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + } + pushNode(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + const tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + } + push(...args) { + for (let i = 0, l = args.length; i < l; i++) { + push(this, args[i]); + } + return this.length; + } + unshift(...args) { + for (var i = 0, l = args.length; i < l; i++) { + unshift(this, args[i]); + } + return this.length; + } + pop() { + if (!this.tail) { + return void 0; + } + const res = this.tail.value; + const t = this.tail; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = void 0; + } else { + this.head = void 0; + } + t.list = void 0; + this.length--; + return res; + } + shift() { + if (!this.head) { + return void 0; + } + const res = this.head.value; + const h = this.head; + this.head = this.head.next; + if (this.head) { + this.head.prev = void 0; + } else { + this.tail = void 0; + } + h.list = void 0; + this.length--; + return res; + } + forEach(fn2, thisp) { + thisp = thisp || this; + for (let walker = this.head, i = 0; !!walker; i++) { + fn2.call(thisp, walker.value, i, this); + walker = walker.next; + } + } + forEachReverse(fn2, thisp) { + thisp = thisp || this; + for (let walker = this.tail, i = this.length - 1; !!walker; i--) { + fn2.call(thisp, walker.value, i, this); + walker = walker.prev; + } + } + get(n) { + let i = 0; + let walker = this.head; + for (; !!walker && i < n; i++) { + walker = walker.next; + } + if (i === n && !!walker) { + return walker.value; + } + } + getReverse(n) { + let i = 0; + let walker = this.tail; + for (; !!walker && i < n; i++) { + walker = walker.prev; + } + if (i === n && !!walker) { + return walker.value; + } + } + map(fn2, thisp) { + thisp = thisp || this; + const res = new _Yallist(); + for (let walker = this.head; !!walker; ) { + res.push(fn2.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + } + mapReverse(fn2, thisp) { + thisp = thisp || this; + var res = new _Yallist(); + for (let walker = this.tail; !!walker; ) { + res.push(fn2.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + } + reduce(fn2, initial) { + let acc; + let walker = this.head; + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = 0; !!walker; i++) { + acc = fn2(acc, walker.value, i); + walker = walker.next; + } + return acc; + } + reduceReverse(fn2, initial) { + let acc; + let walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (let i = this.length - 1; !!walker; i--) { + acc = fn2(acc, walker.value, i); + walker = walker.prev; + } + return acc; + } + toArray() { + const arr = new Array(this.length); + for (let i = 0, walker = this.head; !!walker; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + } + toArrayReverse() { + const arr = new Array(this.length); + for (let i = 0, walker = this.tail; !!walker; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + } + slice(from = 0, to = this.length) { + if (to < 0) { + to += this.length; + } + if (from < 0) { + from += this.length; + } + const ret = new _Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + let walker = this.head; + let i = 0; + for (i = 0; !!walker && i < from; i++) { + walker = walker.next; + } + for (; !!walker && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + return ret; + } + sliceReverse(from = 0, to = this.length) { + if (to < 0) { + to += this.length; + } + if (from < 0) { + from += this.length; + } + const ret = new _Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + let i = this.length; + let walker = this.tail; + for (; !!walker && i > to; i--) { + walker = walker.prev; + } + for (; !!walker && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + return ret; + } + splice(start, deleteCount = 0, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + let walker = this.head; + for (let i = 0; !!walker && i < start; i++) { + walker = walker.next; + } + const ret = []; + for (let i = 0; !!walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); + } + if (!walker) { + walker = this.tail; + } else if (walker !== this.tail) { + walker = walker.prev; + } + for (const v of nodes) { + walker = insertAfter(this, walker, v); + } + return ret; + } + reverse() { + const head = this.head; + const tail = this.tail; + for (let walker = head; !!walker; walker = walker.prev) { + const p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + } + }; + Node = class { + list; + next; + prev; + value; + constructor(value, prev, next, list2) { + this.list = list2; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = void 0; + } + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = void 0; + } + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pack.js +var import_fs12, import_path10, PackJob, EOF2, ONSTAT, ENDED3, QUEUE2, CURRENT, PROCESS2, PROCESSING, PROCESSJOB, JOBS, JOBDONE, ADDFSENTRY, ADDTARENTRY, STAT, READDIR, ONREADDIR, PIPE, ENTRY, ENTRYOPT, WRITEENTRYCLASS, WRITE, ONDRAIN2, Pack, PackSync; +var init_pack = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pack.js"() { + import_fs12 = __toESM(require("fs"), 1); + init_write_entry(); + init_esm(); + init_esm3(); + init_esm5(); + init_read_entry(); + init_warn_method(); + import_path10 = __toESM(require("path"), 1); + init_normalize_windows_path(); + PackJob = class { + path; + absolute; + entry; + stat; + readdir; + pending = false; + ignore = false; + piped = false; + constructor(path16, absolute) { + this.path = path16 || "./"; + this.absolute = absolute; + } + }; + EOF2 = Buffer.alloc(1024); + ONSTAT = Symbol("onStat"); + ENDED3 = Symbol("ended"); + QUEUE2 = Symbol("queue"); + CURRENT = Symbol("current"); + PROCESS2 = Symbol("process"); + PROCESSING = Symbol("processing"); + PROCESSJOB = Symbol("processJob"); + JOBS = Symbol("jobs"); + JOBDONE = Symbol("jobDone"); + ADDFSENTRY = Symbol("addFSEntry"); + ADDTARENTRY = Symbol("addTarEntry"); + STAT = Symbol("stat"); + READDIR = Symbol("readdir"); + ONREADDIR = Symbol("onreaddir"); + PIPE = Symbol("pipe"); + ENTRY = Symbol("entry"); + ENTRYOPT = Symbol("entryOpt"); + WRITEENTRYCLASS = Symbol("writeEntryClass"); + WRITE = Symbol("write"); + ONDRAIN2 = Symbol("ondrain"); + Pack = class extends Minipass { + opt; + cwd; + maxReadSize; + preservePaths; + strict; + noPax; + prefix; + linkCache; + statCache; + file; + portable; + zip; + readdirCache; + noDirRecurse; + follow; + noMtime; + mtime; + filter; + jobs; + [WRITEENTRYCLASS]; + onWriteEntry; + // Note: we actually DO need a linked list here, because we + // shift() to update the head of the list where we start, but still + // while that happens, need to know what the next item in the queue + // will be. Since we do multiple jobs in parallel, it's not as simple + // as just an Array.shift(), since that would lose the information about + // the next job in the list. We could add a .next field on the PackJob + // class, but then we'd have to be tracking the tail of the queue the + // whole time, and Yallist just does that for us anyway. + [QUEUE2]; + [JOBS] = 0; + [PROCESSING] = false; + [ENDED3] = false; + constructor(opt = {}) { + super(); + this.opt = opt; + this.file = opt.file || ""; + this.cwd = opt.cwd || process.cwd(); + this.maxReadSize = opt.maxReadSize; + this.preservePaths = !!opt.preservePaths; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.prefix = normalizeWindowsPath(opt.prefix || ""); + this.linkCache = opt.linkCache || /* @__PURE__ */ new Map(); + this.statCache = opt.statCache || /* @__PURE__ */ new Map(); + this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map(); + this.onWriteEntry = opt.onWriteEntry; + this[WRITEENTRYCLASS] = WriteEntry; + if (typeof opt.onwarn === "function") { + this.on("warn", opt.onwarn); + } + this.portable = !!opt.portable; + if (opt.gzip || opt.brotli || opt.zstd) { + if ((opt.gzip ? 1 : 0) + (opt.brotli ? 1 : 0) + (opt.zstd ? 1 : 0) > 1) { + throw new TypeError("gzip, brotli, zstd are mutually exclusive"); + } + if (opt.gzip) { + if (typeof opt.gzip !== "object") { + opt.gzip = {}; + } + if (this.portable) { + opt.gzip.portable = true; + } + this.zip = new Gzip(opt.gzip); + } + if (opt.brotli) { + if (typeof opt.brotli !== "object") { + opt.brotli = {}; + } + this.zip = new BrotliCompress(opt.brotli); + } + if (opt.zstd) { + if (typeof opt.zstd !== "object") { + opt.zstd = {}; + } + this.zip = new ZstdCompress(opt.zstd); + } + if (!this.zip) + throw new Error("impossible"); + const zip = this.zip; + zip.on("data", (chunk) => super.write(chunk)); + zip.on("end", () => super.end()); + zip.on("drain", () => this[ONDRAIN2]()); + this.on("resume", () => zip.resume()); + } else { + this.on("drain", this[ONDRAIN2]); + } + this.noDirRecurse = !!opt.noDirRecurse; + this.follow = !!opt.follow; + this.noMtime = !!opt.noMtime; + if (opt.mtime) + this.mtime = opt.mtime; + this.filter = typeof opt.filter === "function" ? opt.filter : () => true; + this[QUEUE2] = new Yallist(); + this[JOBS] = 0; + this.jobs = Number(opt.jobs) || 4; + this[PROCESSING] = false; + this[ENDED3] = false; + } + [WRITE](chunk) { + return super.write(chunk); + } + add(path16) { + this.write(path16); + return this; + } + end(path16, encoding, cb) { + if (typeof path16 === "function") { + cb = path16; + path16 = void 0; + } + if (typeof encoding === "function") { + cb = encoding; + encoding = void 0; + } + if (path16) { + this.add(path16); + } + this[ENDED3] = true; + this[PROCESS2](); + if (cb) + cb(); + return this; + } + write(path16) { + if (this[ENDED3]) { + throw new Error("write after end"); + } + if (path16 instanceof ReadEntry) { + this[ADDTARENTRY](path16); + } else { + this[ADDFSENTRY](path16); + } + return this.flowing; + } + [ADDTARENTRY](p) { + const absolute = normalizeWindowsPath(import_path10.default.resolve(this.cwd, p.path)); + if (!this.filter(p.path, p)) { + p.resume(); + } else { + const job = new PackJob(p.path, absolute); + job.entry = new WriteEntryTar(p, this[ENTRYOPT](job)); + job.entry.on("end", () => this[JOBDONE](job)); + this[JOBS] += 1; + this[QUEUE2].push(job); + } + this[PROCESS2](); + } + [ADDFSENTRY](p) { + const absolute = normalizeWindowsPath(import_path10.default.resolve(this.cwd, p)); + this[QUEUE2].push(new PackJob(p, absolute)); + this[PROCESS2](); + } + [STAT](job) { + job.pending = true; + this[JOBS] += 1; + const stat = this.follow ? "stat" : "lstat"; + import_fs12.default[stat](job.absolute, (er, stat2) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + this.emit("error", er); + } else { + this[ONSTAT](job, stat2); + } + }); + } + [ONSTAT](job, stat) { + this.statCache.set(job.absolute, stat); + job.stat = stat; + if (!this.filter(job.path, stat)) { + job.ignore = true; + } + this[PROCESS2](); + } + [READDIR](job) { + job.pending = true; + this[JOBS] += 1; + import_fs12.default.readdir(job.absolute, (er, entries) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + return this.emit("error", er); + } + this[ONREADDIR](job, entries); + }); + } + [ONREADDIR](job, entries) { + this.readdirCache.set(job.absolute, entries); + job.readdir = entries; + this[PROCESS2](); + } + [PROCESS2]() { + if (this[PROCESSING]) { + return; + } + this[PROCESSING] = true; + for (let w = this[QUEUE2].head; !!w && this[JOBS] < this.jobs; w = w.next) { + this[PROCESSJOB](w.value); + if (w.value.ignore) { + const p = w.next; + this[QUEUE2].removeNode(w); + w.next = p; + } + } + this[PROCESSING] = false; + if (this[ENDED3] && !this[QUEUE2].length && this[JOBS] === 0) { + if (this.zip) { + this.zip.end(EOF2); + } else { + super.write(EOF2); + super.end(); + } + } + } + get [CURRENT]() { + return this[QUEUE2] && this[QUEUE2].head && this[QUEUE2].head.value; + } + [JOBDONE](_job) { + this[QUEUE2].shift(); + this[JOBS] -= 1; + this[PROCESS2](); + } + [PROCESSJOB](job) { + if (job.pending) { + return; + } + if (job.entry) { + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + return; + } + if (!job.stat) { + const sc = this.statCache.get(job.absolute); + if (sc) { + this[ONSTAT](job, sc); + } else { + this[STAT](job); + } + } + if (!job.stat) { + return; + } + if (job.ignore) { + return; + } + if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) { + const rc = this.readdirCache.get(job.absolute); + if (rc) { + this[ONREADDIR](job, rc); + } else { + this[READDIR](job); + } + if (!job.readdir) { + return; + } + } + job.entry = this[ENTRY](job); + if (!job.entry) { + job.ignore = true; + return; + } + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + } + [ENTRYOPT](job) { + return { + onwarn: (code2, msg, data) => this.warn(code2, msg, data), + noPax: this.noPax, + cwd: this.cwd, + absolute: job.absolute, + preservePaths: this.preservePaths, + maxReadSize: this.maxReadSize, + strict: this.strict, + portable: this.portable, + linkCache: this.linkCache, + statCache: this.statCache, + noMtime: this.noMtime, + mtime: this.mtime, + prefix: this.prefix, + onWriteEntry: this.onWriteEntry + }; + } + [ENTRY](job) { + this[JOBS] += 1; + try { + const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); + return e.on("end", () => this[JOBDONE](job)).on("error", (er) => this.emit("error", er)); + } catch (er) { + this.emit("error", er); + } + } + [ONDRAIN2]() { + if (this[CURRENT] && this[CURRENT].entry) { + this[CURRENT].entry.resume(); + } + } + // like .pipe() but using super, because our write() is special + [PIPE](job) { + job.piped = true; + if (job.readdir) { + job.readdir.forEach((entry) => { + const p = job.path; + const base = p === "./" ? "" : p.replace(/\/*$/, "/"); + this[ADDFSENTRY](base + entry); + }); + } + const source = job.entry; + const zip = this.zip; + if (!source) + throw new Error("cannot pipe without source"); + if (zip) { + source.on("data", (chunk) => { + if (!zip.write(chunk)) { + source.pause(); + } + }); + } else { + source.on("data", (chunk) => { + if (!super.write(chunk)) { + source.pause(); + } + }); + } + } + pause() { + if (this.zip) { + this.zip.pause(); + } + return super.pause(); + } + warn(code2, message, data = {}) { + warnMethod(this, code2, message, data); + } + }; + PackSync = class extends Pack { + sync = true; + constructor(opt) { + super(opt); + this[WRITEENTRYCLASS] = WriteEntrySync; + } + // pause/resume are no-ops in sync streams. + pause() { + } + resume() { + } + [STAT](job) { + const stat = this.follow ? "statSync" : "lstatSync"; + this[ONSTAT](job, import_fs12.default[stat](job.absolute)); + } + [READDIR](job) { + this[ONREADDIR](job, import_fs12.default.readdirSync(job.absolute)); + } + // gotta get it all in this tick + [PIPE](job) { + const source = job.entry; + const zip = this.zip; + if (job.readdir) { + job.readdir.forEach((entry) => { + const p = job.path; + const base = p === "./" ? "" : p.replace(/\/*$/, "/"); + this[ADDFSENTRY](base + entry); + }); + } + if (!source) + throw new Error("Cannot pipe without source"); + if (zip) { + source.on("data", (chunk) => { + zip.write(chunk); + }); + } else { + source.on("data", (chunk) => { + super[WRITE](chunk); + }); + } + } + }; + } +}); + +// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/create.js +var create_exports = {}; +__export(create_exports, { + create: () => create +}); +var import_node_path8, createFileSync, createFile, addFilesSync, addFilesAsync, createSync, createAsync, create; +var init_create = __esm({ + ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/create.js"() { + init_esm2(); + import_node_path8 = __toESM(require("node:path"), 1); + init_list(); + init_make_command(); + init_pack(); + createFileSync = (opt, files) => { + const p = new PackSync(opt); + const stream = new WriteStreamSync(opt.file, { + mode: opt.mode || 438 + }); + p.pipe(stream); + addFilesSync(p, files); + }; + createFile = (opt, files) => { + const p = new Pack(opt); + const stream = new WriteStream(opt.file, { + mode: opt.mode || 438 + }); + p.pipe(stream); + const promise = new Promise((res, rej) => { + stream.on("error", rej); + stream.on("close", res); + p.on("error", rej); + }); + addFilesAsync(p, files); + return promise; + }; + addFilesSync = (p, files) => { + files.forEach((file) => { + if (file.charAt(0) === "@") { + list({ + file: import_node_path8.default.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: (entry) => p.add(entry) + }); + } else { + p.add(file); + } + }); + p.end(); + }; + addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === "@") { + await list({ + file: import_node_path8.default.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: (entry) => { + p.add(entry); + } + }); + } else { + p.add(file); + } + } + p.end(); + }; + createSync = (opt, files) => { + const p = new PackSync(opt); + addFilesSync(p, files); + return p; + }; + createAsync = (opt, files) => { + const p = new Pack(opt); + addFilesAsync(p, files); + return p; + }; + create = makeCommand(createFileSync, createFile, createSync, createAsync, (_opt, files) => { + if (!files?.length) { + throw new TypeError("no paths specified to add to archive"); + } + }); + } +}); + +// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/major.js +var require_major = __commonJS({ + ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/major.js"(exports2, module2) { + "use strict"; + var SemVer3 = require_semver(); + var major = (a, loose) => new SemVer3(a, loose).major; + module2.exports = major; + } +}); + +// sources/_lib.ts +var lib_exports2 = {}; +__export(lib_exports2, { + runMain: () => runMain +}); +module.exports = __toCommonJS(lib_exports2); + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/constants.mjs +var NODE_INITIAL = 0; +var NODE_SUCCESS = 1; +var NODE_ERRORED = 2; +var START_OF_INPUT = ``; +var END_OF_INPUT = `\0`; +var HELP_COMMAND_INDEX = -1; +var HELP_REGEX = /^(-h|--help)(?:=([0-9]+))?$/; +var OPTION_REGEX = /^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/; +var BATCH_REGEX = /^-[a-zA-Z]{2,}$/; +var BINDING_REGEX = /^([^=]+)=([\s\S]*)$/; +var DEBUG = process.env.DEBUG_CLI === `1`; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/errors.mjs +var UsageError = class extends Error { + constructor(message) { + super(message); + this.clipanion = { type: `usage` }; + this.name = `UsageError`; + } +}; +var UnknownSyntaxError = class extends Error { + constructor(input, candidates) { + super(); + this.input = input; + this.candidates = candidates; + this.clipanion = { type: `none` }; + this.name = `UnknownSyntaxError`; + if (this.candidates.length === 0) { + this.message = `Command not found, but we're not sure what's the alternative.`; + } else if (this.candidates.every((candidate) => candidate.reason !== null && candidate.reason === candidates[0].reason)) { + const [{ reason }] = this.candidates; + this.message = `${reason} + +${this.candidates.map(({ usage }) => `$ ${usage}`).join(` +`)}`; + } else if (this.candidates.length === 1) { + const [{ usage }] = this.candidates; + this.message = `Command not found; did you mean: + +$ ${usage} +${whileRunning(input)}`; + } else { + this.message = `Command not found; did you mean one of: + +${this.candidates.map(({ usage }, index) => { + return `${`${index}.`.padStart(4)} ${usage}`; + }).join(` +`)} + +${whileRunning(input)}`; + } + } +}; +var AmbiguousSyntaxError = class extends Error { + constructor(input, usages) { + super(); + this.input = input; + this.usages = usages; + this.clipanion = { type: `none` }; + this.name = `AmbiguousSyntaxError`; + this.message = `Cannot find which to pick amongst the following alternatives: + +${this.usages.map((usage, index) => { + return `${`${index}.`.padStart(4)} ${usage}`; + }).join(` +`)} + +${whileRunning(input)}`; + } +}; +var whileRunning = (input) => `While running ${input.filter((token) => { + return token !== END_OF_INPUT; +}).map((token) => { + const json = JSON.stringify(token); + if (token.match(/\s/) || token.length === 0 || json !== `"${token}"`) { + return json; + } else { + return token; + } +}).join(` `)}`; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/format.mjs +var MAX_LINE_LENGTH = 80; +var richLine = Array(MAX_LINE_LENGTH).fill(`\u2501`); +for (let t = 0; t <= 24; ++t) + richLine[richLine.length - t] = `\x1B[38;5;${232 + t}m\u2501`; +var richFormat = { + header: (str) => `\x1B[1m\u2501\u2501\u2501 ${str}${str.length < MAX_LINE_LENGTH - 5 ? ` ${richLine.slice(str.length + 5).join(``)}` : `:`}\x1B[0m`, + bold: (str) => `\x1B[1m${str}\x1B[22m`, + error: (str) => `\x1B[31m\x1B[1m${str}\x1B[22m\x1B[39m`, + code: (str) => `\x1B[36m${str}\x1B[39m` +}; +var textFormat = { + header: (str) => str, + bold: (str) => str, + error: (str) => str, + code: (str) => str +}; +function dedent(text) { + const lines = text.split(` +`); + const nonEmptyLines = lines.filter((line) => line.match(/\S/)); + const indent = nonEmptyLines.length > 0 ? nonEmptyLines.reduce((minLength, line) => Math.min(minLength, line.length - line.trimStart().length), Number.MAX_VALUE) : 0; + return lines.map((line) => line.slice(indent).trimRight()).join(` +`); +} +function formatMarkdownish(text, { format, paragraphs }) { + text = text.replace(/\r\n?/g, ` +`); + text = dedent(text); + text = text.replace(/^\n+|\n+$/g, ``); + text = text.replace(/^(\s*)-([^\n]*?)\n+/gm, `$1-$2 + +`); + text = text.replace(/\n(\n)?\n*/g, ($0, $1) => $1 ? $1 : ` `); + if (paragraphs) { + text = text.split(/\n/).map((paragraph) => { + const bulletMatch = paragraph.match(/^\s*[*-][\t ]+(.*)/); + if (!bulletMatch) + return paragraph.match(/(.{1,80})(?: |$)/g).join(` +`); + const indent = paragraph.length - paragraph.trimStart().length; + return bulletMatch[1].match(new RegExp(`(.{1,${78 - indent}})(?: |$)`, `g`)).map((line, index) => { + return ` `.repeat(indent) + (index === 0 ? `- ` : ` `) + line; + }).join(` +`); + }).join(` + +`); + } + text = text.replace(/(`+)((?:.|[\n])*?)\1/g, ($0, $1, $2) => { + return format.code($1 + $2 + $1); + }); + text = text.replace(/(\*\*)((?:.|[\n])*?)\1/g, ($0, $1, $2) => { + return format.bold($1 + $2 + $1); + }); + return text ? `${text} +` : ``; +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/utils.mjs +var isOptionSymbol = Symbol(`clipanion/isOption`); +function makeCommandOption(spec) { + return { ...spec, [isOptionSymbol]: true }; +} +function rerouteArguments(a, b) { + if (typeof a === `undefined`) + return [a, b]; + if (typeof a === `object` && a !== null && !Array.isArray(a)) { + return [void 0, a]; + } else { + return [a, b]; + } +} +function cleanValidationError(message, { mergeName = false } = {}) { + const match = message.match(/^([^:]+): (.*)$/m); + if (!match) + return `validation failed`; + let [, path16, line] = match; + if (mergeName) + line = line[0].toLowerCase() + line.slice(1); + line = path16 !== `.` || !mergeName ? `${path16.replace(/^\.(\[|$)/, `$1`)}: ${line}` : `: ${line}`; + return line; +} +function formatError(message, errors) { + if (errors.length === 1) { + return new UsageError(`${message}${cleanValidationError(errors[0], { mergeName: true })}`); + } else { + return new UsageError(`${message}: +${errors.map((error) => ` +- ${cleanValidationError(error)}`).join(``)}`); + } +} +function applyValidator(name2, value, validator) { + if (typeof validator === `undefined`) + return value; + const errors = []; + const coercions = []; + const coercion = (v) => { + const orig = value; + value = v; + return coercion.bind(null, orig); + }; + const check = validator(value, { errors, coercions, coercion }); + if (!check) + throw formatError(`Invalid value for ${name2}`, errors); + for (const [, op] of coercions) + op(); + return value; +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/Command.mjs +var Command = class { + constructor() { + this.help = false; + } + /** + * Defines the usage information for the given command. + */ + static Usage(usage) { + return usage; + } + /** + * Standard error handler which will simply rethrow the error. Can be used + * to add custom logic to handle errors from the command or simply return + * the parent class error handling. + */ + async catch(error) { + throw error; + } + async validateAndExecute() { + const commandClass = this.constructor; + const cascade2 = commandClass.schema; + if (Array.isArray(cascade2)) { + const { isDict: isDict2, isUnknown: isUnknown2, applyCascade: applyCascade2 } = await Promise.resolve().then(() => (init_lib(), lib_exports)); + const schema = applyCascade2(isDict2(isUnknown2()), cascade2); + const errors = []; + const coercions = []; + const check = schema(this, { errors, coercions }); + if (!check) + throw formatError(`Invalid option schema`, errors); + for (const [, op] of coercions) { + op(); + } + } else if (cascade2 != null) { + throw new Error(`Invalid command schema`); + } + const exitCode = await this.execute(); + if (typeof exitCode !== `undefined`) { + return exitCode; + } else { + return 0; + } + } +}; +Command.isOption = isOptionSymbol; +Command.Default = []; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/core.mjs +function debug(str) { + if (DEBUG) { + console.log(str); + } +} +var basicHelpState = { + candidateUsage: null, + requiredOptions: [], + errorMessage: null, + ignoreOptions: false, + path: [], + positionals: [], + options: [], + remainder: null, + selectedIndex: HELP_COMMAND_INDEX +}; +function makeStateMachine() { + return { + nodes: [makeNode(), makeNode(), makeNode()] + }; +} +function makeAnyOfMachine(inputs) { + const output = makeStateMachine(); + const heads = []; + let offset = output.nodes.length; + for (const input of inputs) { + heads.push(offset); + for (let t = 0; t < input.nodes.length; ++t) + if (!isTerminalNode(t)) + output.nodes.push(cloneNode(input.nodes[t], offset)); + offset += input.nodes.length - 2; + } + for (const head of heads) + registerShortcut(output, NODE_INITIAL, head); + return output; +} +function injectNode(machine, node) { + machine.nodes.push(node); + return machine.nodes.length - 1; +} +function simplifyMachine(input) { + const visited = /* @__PURE__ */ new Set(); + const process5 = (node) => { + if (visited.has(node)) + return; + visited.add(node); + const nodeDef = input.nodes[node]; + for (const transitions of Object.values(nodeDef.statics)) + for (const { to } of transitions) + process5(to); + for (const [, { to }] of nodeDef.dynamics) + process5(to); + for (const { to } of nodeDef.shortcuts) + process5(to); + const shortcuts = new Set(nodeDef.shortcuts.map(({ to }) => to)); + while (nodeDef.shortcuts.length > 0) { + const { to } = nodeDef.shortcuts.shift(); + const toDef = input.nodes[to]; + for (const [segment, transitions] of Object.entries(toDef.statics)) { + const store = !Object.prototype.hasOwnProperty.call(nodeDef.statics, segment) ? nodeDef.statics[segment] = [] : nodeDef.statics[segment]; + for (const transition of transitions) { + if (!store.some(({ to: to2 }) => transition.to === to2)) { + store.push(transition); + } + } + } + for (const [test, transition] of toDef.dynamics) + if (!nodeDef.dynamics.some(([otherTest, { to: to2 }]) => test === otherTest && transition.to === to2)) + nodeDef.dynamics.push([test, transition]); + for (const transition of toDef.shortcuts) { + if (!shortcuts.has(transition.to)) { + nodeDef.shortcuts.push(transition); + shortcuts.add(transition.to); + } + } + } + }; + process5(NODE_INITIAL); +} +function debugMachine(machine, { prefix = `` } = {}) { + if (DEBUG) { + debug(`${prefix}Nodes are:`); + for (let t = 0; t < machine.nodes.length; ++t) { + debug(`${prefix} ${t}: ${JSON.stringify(machine.nodes[t])}`); + } + } +} +function runMachineInternal(machine, input, partial = false) { + debug(`Running a vm on ${JSON.stringify(input)}`); + let branches = [{ node: NODE_INITIAL, state: { + candidateUsage: null, + requiredOptions: [], + errorMessage: null, + ignoreOptions: false, + options: [], + path: [], + positionals: [], + remainder: null, + selectedIndex: null + } }]; + debugMachine(machine, { prefix: ` ` }); + const tokens = [START_OF_INPUT, ...input]; + for (let t = 0; t < tokens.length; ++t) { + const segment = tokens[t]; + debug(` Processing ${JSON.stringify(segment)}`); + const nextBranches = []; + for (const { node, state } of branches) { + debug(` Current node is ${node}`); + const nodeDef = machine.nodes[node]; + if (node === NODE_ERRORED) { + nextBranches.push({ node, state }); + continue; + } + console.assert(nodeDef.shortcuts.length === 0, `Shortcuts should have been eliminated by now`); + const hasExactMatch = Object.prototype.hasOwnProperty.call(nodeDef.statics, segment); + if (!partial || t < tokens.length - 1 || hasExactMatch) { + if (hasExactMatch) { + const transitions = nodeDef.statics[segment]; + for (const { to, reducer } of transitions) { + nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); + debug(` Static transition to ${to} found`); + } + } else { + debug(` No static transition found`); + } + } else { + let hasMatches = false; + for (const candidate of Object.keys(nodeDef.statics)) { + if (!candidate.startsWith(segment)) + continue; + if (segment === candidate) { + for (const { to, reducer } of nodeDef.statics[candidate]) { + nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); + debug(` Static transition to ${to} found`); + } + } else { + for (const { to } of nodeDef.statics[candidate]) { + nextBranches.push({ node: to, state: { ...state, remainder: candidate.slice(segment.length) } }); + debug(` Static transition to ${to} found (partial match)`); + } + } + hasMatches = true; + } + if (!hasMatches) { + debug(` No partial static transition found`); + } + } + if (segment !== END_OF_INPUT) { + for (const [test, { to, reducer }] of nodeDef.dynamics) { + if (execute(tests, test, state, segment)) { + nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); + debug(` Dynamic transition to ${to} found (via ${test})`); + } + } + } + } + if (nextBranches.length === 0 && segment === END_OF_INPUT && input.length === 1) { + return [{ + node: NODE_INITIAL, + state: basicHelpState + }]; + } + if (nextBranches.length === 0) { + throw new UnknownSyntaxError(input, branches.filter(({ node }) => { + return node !== NODE_ERRORED; + }).map(({ state }) => { + return { usage: state.candidateUsage, reason: null }; + })); + } + if (nextBranches.every(({ node }) => node === NODE_ERRORED)) { + throw new UnknownSyntaxError(input, nextBranches.map(({ state }) => { + return { usage: state.candidateUsage, reason: state.errorMessage }; + })); + } + branches = trimSmallerBranches(nextBranches); + } + if (branches.length > 0) { + debug(` Results:`); + for (const branch of branches) { + debug(` - ${branch.node} -> ${JSON.stringify(branch.state)}`); + } + } else { + debug(` No results`); + } + return branches; +} +function checkIfNodeIsFinished(node, state) { + if (state.selectedIndex !== null) + return true; + if (Object.prototype.hasOwnProperty.call(node.statics, END_OF_INPUT)) { + for (const { to } of node.statics[END_OF_INPUT]) + if (to === NODE_SUCCESS) + return true; + } + return false; +} +function suggestMachine(machine, input, partial) { + const prefix = partial && input.length > 0 ? [``] : []; + const branches = runMachineInternal(machine, input, partial); + const suggestions = []; + const suggestionsJson = /* @__PURE__ */ new Set(); + const traverseSuggestion = (suggestion, node, skipFirst = true) => { + let nextNodes = [node]; + while (nextNodes.length > 0) { + const currentNodes = nextNodes; + nextNodes = []; + for (const node2 of currentNodes) { + const nodeDef = machine.nodes[node2]; + const keys = Object.keys(nodeDef.statics); + for (const key of Object.keys(nodeDef.statics)) { + const segment = keys[0]; + for (const { to, reducer } of nodeDef.statics[segment]) { + if (reducer !== `pushPath`) + continue; + if (!skipFirst) + suggestion.push(segment); + nextNodes.push(to); + } + } + } + skipFirst = false; + } + const json = JSON.stringify(suggestion); + if (suggestionsJson.has(json)) + return; + suggestions.push(suggestion); + suggestionsJson.add(json); + }; + for (const { node, state } of branches) { + if (state.remainder !== null) { + traverseSuggestion([state.remainder], node); + continue; + } + const nodeDef = machine.nodes[node]; + const isFinished = checkIfNodeIsFinished(nodeDef, state); + for (const [candidate, transitions] of Object.entries(nodeDef.statics)) + if (isFinished && candidate !== END_OF_INPUT || !candidate.startsWith(`-`) && transitions.some(({ reducer }) => reducer === `pushPath`)) + traverseSuggestion([...prefix, candidate], node); + if (!isFinished) + continue; + for (const [test, { to }] of nodeDef.dynamics) { + if (to === NODE_ERRORED) + continue; + const tokens = suggest(test, state); + if (tokens === null) + continue; + for (const token of tokens) { + traverseSuggestion([...prefix, token], node); + } + } + } + return [...suggestions].sort(); +} +function runMachine(machine, input) { + const branches = runMachineInternal(machine, [...input, END_OF_INPUT]); + return selectBestState(input, branches.map(({ state }) => { + return state; + })); +} +function trimSmallerBranches(branches) { + let maxPathSize = 0; + for (const { state } of branches) + if (state.path.length > maxPathSize) + maxPathSize = state.path.length; + return branches.filter(({ state }) => { + return state.path.length === maxPathSize; + }); +} +function selectBestState(input, states) { + const terminalStates = states.filter((state) => { + return state.selectedIndex !== null; + }); + if (terminalStates.length === 0) + throw new Error(); + const requiredOptionsSetStates = terminalStates.filter((state) => state.selectedIndex === HELP_COMMAND_INDEX || state.requiredOptions.every((names) => names.some((name2) => state.options.find((opt) => opt.name === name2)))); + if (requiredOptionsSetStates.length === 0) { + throw new UnknownSyntaxError(input, terminalStates.map((state) => ({ + usage: state.candidateUsage, + reason: null + }))); + } + let maxPathSize = 0; + for (const state of requiredOptionsSetStates) + if (state.path.length > maxPathSize) + maxPathSize = state.path.length; + const bestPathBranches = requiredOptionsSetStates.filter((state) => { + return state.path.length === maxPathSize; + }); + const getPositionalCount = (state) => state.positionals.filter(({ extra }) => { + return !extra; + }).length + state.options.length; + const statesWithPositionalCount = bestPathBranches.map((state) => { + return { state, positionalCount: getPositionalCount(state) }; + }); + let maxPositionalCount = 0; + for (const { positionalCount } of statesWithPositionalCount) + if (positionalCount > maxPositionalCount) + maxPositionalCount = positionalCount; + const bestPositionalStates = statesWithPositionalCount.filter(({ positionalCount }) => { + return positionalCount === maxPositionalCount; + }).map(({ state }) => { + return state; + }); + const fixedStates = aggregateHelpStates(bestPositionalStates); + if (fixedStates.length > 1) + throw new AmbiguousSyntaxError(input, fixedStates.map((state) => state.candidateUsage)); + return fixedStates[0]; +} +function aggregateHelpStates(states) { + const notHelps = []; + const helps = []; + for (const state of states) { + if (state.selectedIndex === HELP_COMMAND_INDEX) { + helps.push(state); + } else { + notHelps.push(state); + } + } + if (helps.length > 0) { + notHelps.push({ + ...basicHelpState, + path: findCommonPrefix(...helps.map((state) => state.path)), + options: helps.reduce((options, state) => options.concat(state.options), []) + }); + } + return notHelps; +} +function findCommonPrefix(firstPath, secondPath, ...rest) { + if (secondPath === void 0) + return Array.from(firstPath); + return findCommonPrefix(firstPath.filter((segment, i) => segment === secondPath[i]), ...rest); +} +function makeNode() { + return { + dynamics: [], + shortcuts: [], + statics: {} + }; +} +function isTerminalNode(node) { + return node === NODE_SUCCESS || node === NODE_ERRORED; +} +function cloneTransition(input, offset = 0) { + return { + to: !isTerminalNode(input.to) ? input.to > 2 ? input.to + offset - 2 : input.to + offset : input.to, + reducer: input.reducer + }; +} +function cloneNode(input, offset = 0) { + const output = makeNode(); + for (const [test, transition] of input.dynamics) + output.dynamics.push([test, cloneTransition(transition, offset)]); + for (const transition of input.shortcuts) + output.shortcuts.push(cloneTransition(transition, offset)); + for (const [segment, transitions] of Object.entries(input.statics)) + output.statics[segment] = transitions.map((transition) => cloneTransition(transition, offset)); + return output; +} +function registerDynamic(machine, from, test, to, reducer) { + machine.nodes[from].dynamics.push([ + test, + { to, reducer } + ]); +} +function registerShortcut(machine, from, to, reducer) { + machine.nodes[from].shortcuts.push({ to, reducer }); +} +function registerStatic(machine, from, test, to, reducer) { + const store = !Object.prototype.hasOwnProperty.call(machine.nodes[from].statics, test) ? machine.nodes[from].statics[test] = [] : machine.nodes[from].statics[test]; + store.push({ to, reducer }); +} +function execute(store, callback, state, segment) { + if (Array.isArray(callback)) { + const [name2, ...args] = callback; + return store[name2](state, segment, ...args); + } else { + return store[callback](state, segment); + } +} +function suggest(callback, state) { + const fn2 = Array.isArray(callback) ? tests[callback[0]] : tests[callback]; + if (typeof fn2.suggest === `undefined`) + return null; + const args = Array.isArray(callback) ? callback.slice(1) : []; + return fn2.suggest(state, ...args); +} +var tests = { + always: () => { + return true; + }, + isOptionLike: (state, segment) => { + return !state.ignoreOptions && (segment !== `-` && segment.startsWith(`-`)); + }, + isNotOptionLike: (state, segment) => { + return state.ignoreOptions || segment === `-` || !segment.startsWith(`-`); + }, + isOption: (state, segment, name2, hidden) => { + return !state.ignoreOptions && segment === name2; + }, + isBatchOption: (state, segment, names) => { + return !state.ignoreOptions && BATCH_REGEX.test(segment) && [...segment.slice(1)].every((name2) => names.includes(`-${name2}`)); + }, + isBoundOption: (state, segment, names, options) => { + const optionParsing = segment.match(BINDING_REGEX); + return !state.ignoreOptions && !!optionParsing && OPTION_REGEX.test(optionParsing[1]) && names.includes(optionParsing[1]) && options.filter((opt) => opt.names.includes(optionParsing[1])).every((opt) => opt.allowBinding); + }, + isNegatedOption: (state, segment, name2) => { + return !state.ignoreOptions && segment === `--no-${name2.slice(2)}`; + }, + isHelp: (state, segment) => { + return !state.ignoreOptions && HELP_REGEX.test(segment); + }, + isUnsupportedOption: (state, segment, names) => { + return !state.ignoreOptions && segment.startsWith(`-`) && OPTION_REGEX.test(segment) && !names.includes(segment); + }, + isInvalidOption: (state, segment) => { + return !state.ignoreOptions && segment.startsWith(`-`) && !OPTION_REGEX.test(segment); + } +}; +tests.isOption.suggest = (state, name2, hidden = true) => { + return !hidden ? [name2] : null; +}; +var reducers = { + setCandidateState: (state, segment, candidateState) => { + return { ...state, ...candidateState }; + }, + setSelectedIndex: (state, segment, index) => { + return { ...state, selectedIndex: index }; + }, + pushBatch: (state, segment) => { + return { ...state, options: state.options.concat([...segment.slice(1)].map((name2) => ({ name: `-${name2}`, value: true }))) }; + }, + pushBound: (state, segment) => { + const [, name2, value] = segment.match(BINDING_REGEX); + return { ...state, options: state.options.concat({ name: name2, value }) }; + }, + pushPath: (state, segment) => { + return { ...state, path: state.path.concat(segment) }; + }, + pushPositional: (state, segment) => { + return { ...state, positionals: state.positionals.concat({ value: segment, extra: false }) }; + }, + pushExtra: (state, segment) => { + return { ...state, positionals: state.positionals.concat({ value: segment, extra: true }) }; + }, + pushExtraNoLimits: (state, segment) => { + return { ...state, positionals: state.positionals.concat({ value: segment, extra: NoLimits }) }; + }, + pushTrue: (state, segment, name2 = segment) => { + return { ...state, options: state.options.concat({ name: segment, value: true }) }; + }, + pushFalse: (state, segment, name2 = segment) => { + return { ...state, options: state.options.concat({ name: name2, value: false }) }; + }, + pushUndefined: (state, segment) => { + return { ...state, options: state.options.concat({ name: segment, value: void 0 }) }; + }, + pushStringValue: (state, segment) => { + var _a; + const copy = { ...state, options: [...state.options] }; + const lastOption = state.options[state.options.length - 1]; + lastOption.value = ((_a = lastOption.value) !== null && _a !== void 0 ? _a : []).concat([segment]); + return copy; + }, + setStringValue: (state, segment) => { + const copy = { ...state, options: [...state.options] }; + const lastOption = state.options[state.options.length - 1]; + lastOption.value = segment; + return copy; + }, + inhibateOptions: (state) => { + return { ...state, ignoreOptions: true }; + }, + useHelp: (state, segment, command) => { + const [ + , + /* name */ + , + index + ] = segment.match(HELP_REGEX); + if (typeof index !== `undefined`) { + return { ...state, options: [{ name: `-c`, value: String(command) }, { name: `-i`, value: index }] }; + } else { + return { ...state, options: [{ name: `-c`, value: String(command) }] }; + } + }, + setError: (state, segment, errorMessage) => { + if (segment === END_OF_INPUT) { + return { ...state, errorMessage: `${errorMessage}.` }; + } else { + return { ...state, errorMessage: `${errorMessage} ("${segment}").` }; + } + }, + setOptionArityError: (state, segment) => { + const lastOption = state.options[state.options.length - 1]; + return { ...state, errorMessage: `Not enough arguments to option ${lastOption.name}.` }; + } +}; +var NoLimits = Symbol(); +var CommandBuilder = class { + constructor(cliIndex, cliOpts) { + this.allOptionNames = []; + this.arity = { leading: [], trailing: [], extra: [], proxy: false }; + this.options = []; + this.paths = []; + this.cliIndex = cliIndex; + this.cliOpts = cliOpts; + } + addPath(path16) { + this.paths.push(path16); + } + setArity({ leading = this.arity.leading, trailing = this.arity.trailing, extra = this.arity.extra, proxy = this.arity.proxy }) { + Object.assign(this.arity, { leading, trailing, extra, proxy }); + } + addPositional({ name: name2 = `arg`, required = true } = {}) { + if (!required && this.arity.extra === NoLimits) + throw new Error(`Optional parameters cannot be declared when using .rest() or .proxy()`); + if (!required && this.arity.trailing.length > 0) + throw new Error(`Optional parameters cannot be declared after the required trailing positional arguments`); + if (!required && this.arity.extra !== NoLimits) { + this.arity.extra.push(name2); + } else if (this.arity.extra !== NoLimits && this.arity.extra.length === 0) { + this.arity.leading.push(name2); + } else { + this.arity.trailing.push(name2); + } + } + addRest({ name: name2 = `arg`, required = 0 } = {}) { + if (this.arity.extra === NoLimits) + throw new Error(`Infinite lists cannot be declared multiple times in the same command`); + if (this.arity.trailing.length > 0) + throw new Error(`Infinite lists cannot be declared after the required trailing positional arguments`); + for (let t = 0; t < required; ++t) + this.addPositional({ name: name2 }); + this.arity.extra = NoLimits; + } + addProxy({ required = 0 } = {}) { + this.addRest({ required }); + this.arity.proxy = true; + } + addOption({ names, description, arity = 0, hidden = false, required = false, allowBinding = true }) { + if (!allowBinding && arity > 1) + throw new Error(`The arity cannot be higher than 1 when the option only supports the --arg=value syntax`); + if (!Number.isInteger(arity)) + throw new Error(`The arity must be an integer, got ${arity}`); + if (arity < 0) + throw new Error(`The arity must be positive, got ${arity}`); + this.allOptionNames.push(...names); + this.options.push({ names, description, arity, hidden, required, allowBinding }); + } + setContext(context) { + this.context = context; + } + usage({ detailed = true, inlineOptions = true } = {}) { + const segments = [this.cliOpts.binaryName]; + const detailedOptionList = []; + if (this.paths.length > 0) + segments.push(...this.paths[0]); + if (detailed) { + for (const { names, arity, hidden, description, required } of this.options) { + if (hidden) + continue; + const args = []; + for (let t = 0; t < arity; ++t) + args.push(` #${t}`); + const definition = `${names.join(`,`)}${args.join(``)}`; + if (!inlineOptions && description) { + detailedOptionList.push({ definition, description, required }); + } else { + segments.push(required ? `<${definition}>` : `[${definition}]`); + } + } + segments.push(...this.arity.leading.map((name2) => `<${name2}>`)); + if (this.arity.extra === NoLimits) + segments.push(`...`); + else + segments.push(...this.arity.extra.map((name2) => `[${name2}]`)); + segments.push(...this.arity.trailing.map((name2) => `<${name2}>`)); + } + const usage = segments.join(` `); + return { usage, options: detailedOptionList }; + } + compile() { + if (typeof this.context === `undefined`) + throw new Error(`Assertion failed: No context attached`); + const machine = makeStateMachine(); + let firstNode = NODE_INITIAL; + const candidateUsage = this.usage().usage; + const requiredOptions = this.options.filter((opt) => opt.required).map((opt) => opt.names); + firstNode = injectNode(machine, makeNode()); + registerStatic(machine, NODE_INITIAL, START_OF_INPUT, firstNode, [`setCandidateState`, { candidateUsage, requiredOptions }]); + const positionalArgument = this.arity.proxy ? `always` : `isNotOptionLike`; + const paths = this.paths.length > 0 ? this.paths : [[]]; + for (const path16 of paths) { + let lastPathNode = firstNode; + if (path16.length > 0) { + const optionPathNode = injectNode(machine, makeNode()); + registerShortcut(machine, lastPathNode, optionPathNode); + this.registerOptions(machine, optionPathNode); + lastPathNode = optionPathNode; + } + for (let t = 0; t < path16.length; ++t) { + const nextPathNode = injectNode(machine, makeNode()); + registerStatic(machine, lastPathNode, path16[t], nextPathNode, `pushPath`); + lastPathNode = nextPathNode; + } + if (this.arity.leading.length > 0 || !this.arity.proxy) { + const helpNode = injectNode(machine, makeNode()); + registerDynamic(machine, lastPathNode, `isHelp`, helpNode, [`useHelp`, this.cliIndex]); + registerDynamic(machine, helpNode, `always`, helpNode, `pushExtra`); + registerStatic(machine, helpNode, END_OF_INPUT, NODE_SUCCESS, [`setSelectedIndex`, HELP_COMMAND_INDEX]); + this.registerOptions(machine, lastPathNode); + } + if (this.arity.leading.length > 0) + registerStatic(machine, lastPathNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); + let lastLeadingNode = lastPathNode; + for (let t = 0; t < this.arity.leading.length; ++t) { + const nextLeadingNode = injectNode(machine, makeNode()); + if (!this.arity.proxy || t + 1 !== this.arity.leading.length) + this.registerOptions(machine, nextLeadingNode); + if (this.arity.trailing.length > 0 || t + 1 !== this.arity.leading.length) + registerStatic(machine, nextLeadingNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); + registerDynamic(machine, lastLeadingNode, `isNotOptionLike`, nextLeadingNode, `pushPositional`); + lastLeadingNode = nextLeadingNode; + } + let lastExtraNode = lastLeadingNode; + if (this.arity.extra === NoLimits || this.arity.extra.length > 0) { + const extraShortcutNode = injectNode(machine, makeNode()); + registerShortcut(machine, lastLeadingNode, extraShortcutNode); + if (this.arity.extra === NoLimits) { + const extraNode = injectNode(machine, makeNode()); + if (!this.arity.proxy) + this.registerOptions(machine, extraNode); + registerDynamic(machine, lastLeadingNode, positionalArgument, extraNode, `pushExtraNoLimits`); + registerDynamic(machine, extraNode, positionalArgument, extraNode, `pushExtraNoLimits`); + registerShortcut(machine, extraNode, extraShortcutNode); + } else { + for (let t = 0; t < this.arity.extra.length; ++t) { + const nextExtraNode = injectNode(machine, makeNode()); + if (!this.arity.proxy || t > 0) + this.registerOptions(machine, nextExtraNode); + registerDynamic(machine, lastExtraNode, positionalArgument, nextExtraNode, `pushExtra`); + registerShortcut(machine, nextExtraNode, extraShortcutNode); + lastExtraNode = nextExtraNode; + } + } + lastExtraNode = extraShortcutNode; + } + if (this.arity.trailing.length > 0) + registerStatic(machine, lastExtraNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); + let lastTrailingNode = lastExtraNode; + for (let t = 0; t < this.arity.trailing.length; ++t) { + const nextTrailingNode = injectNode(machine, makeNode()); + if (!this.arity.proxy) + this.registerOptions(machine, nextTrailingNode); + if (t + 1 < this.arity.trailing.length) + registerStatic(machine, nextTrailingNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); + registerDynamic(machine, lastTrailingNode, `isNotOptionLike`, nextTrailingNode, `pushPositional`); + lastTrailingNode = nextTrailingNode; + } + registerDynamic(machine, lastTrailingNode, positionalArgument, NODE_ERRORED, [`setError`, `Extraneous positional argument`]); + registerStatic(machine, lastTrailingNode, END_OF_INPUT, NODE_SUCCESS, [`setSelectedIndex`, this.cliIndex]); + } + return { + machine, + context: this.context + }; + } + registerOptions(machine, node) { + registerDynamic(machine, node, [`isOption`, `--`], node, `inhibateOptions`); + registerDynamic(machine, node, [`isBatchOption`, this.allOptionNames], node, `pushBatch`); + registerDynamic(machine, node, [`isBoundOption`, this.allOptionNames, this.options], node, `pushBound`); + registerDynamic(machine, node, [`isUnsupportedOption`, this.allOptionNames], NODE_ERRORED, [`setError`, `Unsupported option name`]); + registerDynamic(machine, node, [`isInvalidOption`], NODE_ERRORED, [`setError`, `Invalid option name`]); + for (const option of this.options) { + const longestName = option.names.reduce((longestName2, name2) => { + return name2.length > longestName2.length ? name2 : longestName2; + }, ``); + if (option.arity === 0) { + for (const name2 of option.names) { + registerDynamic(machine, node, [`isOption`, name2, option.hidden || name2 !== longestName], node, `pushTrue`); + if (name2.startsWith(`--`) && !name2.startsWith(`--no-`)) { + registerDynamic(machine, node, [`isNegatedOption`, name2], node, [`pushFalse`, name2]); + } + } + } else { + let lastNode = injectNode(machine, makeNode()); + for (const name2 of option.names) + registerDynamic(machine, node, [`isOption`, name2, option.hidden || name2 !== longestName], lastNode, `pushUndefined`); + for (let t = 0; t < option.arity; ++t) { + const nextNode = injectNode(machine, makeNode()); + registerStatic(machine, lastNode, END_OF_INPUT, NODE_ERRORED, `setOptionArityError`); + registerDynamic(machine, lastNode, `isOptionLike`, NODE_ERRORED, `setOptionArityError`); + const action = option.arity === 1 ? `setStringValue` : `pushStringValue`; + registerDynamic(machine, lastNode, `isNotOptionLike`, nextNode, action); + lastNode = nextNode; + } + registerShortcut(machine, lastNode, node); + } + } + } +}; +var CliBuilder = class _CliBuilder { + constructor({ binaryName = `...` } = {}) { + this.builders = []; + this.opts = { binaryName }; + } + static build(cbs, opts = {}) { + return new _CliBuilder(opts).commands(cbs).compile(); + } + getBuilderByIndex(n) { + if (!(n >= 0 && n < this.builders.length)) + throw new Error(`Assertion failed: Out-of-bound command index (${n})`); + return this.builders[n]; + } + commands(cbs) { + for (const cb of cbs) + cb(this.command()); + return this; + } + command() { + const builder = new CommandBuilder(this.builders.length, this.opts); + this.builders.push(builder); + return builder; + } + compile() { + const machines = []; + const contexts = []; + for (const builder of this.builders) { + const { machine: machine2, context } = builder.compile(); + machines.push(machine2); + contexts.push(context); + } + const machine = makeAnyOfMachine(machines); + simplifyMachine(machine); + return { + machine, + contexts, + process: (input) => { + return runMachine(machine, input); + }, + suggest: (input, partial) => { + return suggestMachine(machine, input, partial); + } + }; + } +}; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/Cli.mjs +var import_platform = __toESM(require_node(), 1); + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/HelpCommand.mjs +var HelpCommand = class _HelpCommand extends Command { + constructor(contexts) { + super(); + this.contexts = contexts; + this.commands = []; + } + static from(state, contexts) { + const command = new _HelpCommand(contexts); + command.path = state.path; + for (const opt of state.options) { + switch (opt.name) { + case `-c`: + { + command.commands.push(Number(opt.value)); + } + break; + case `-i`: + { + command.index = Number(opt.value); + } + break; + } + } + return command; + } + async execute() { + let commands = this.commands; + if (typeof this.index !== `undefined` && this.index >= 0 && this.index < commands.length) + commands = [commands[this.index]]; + if (commands.length === 0) { + this.context.stdout.write(this.cli.usage()); + } else if (commands.length === 1) { + this.context.stdout.write(this.cli.usage(this.contexts[commands[0]].commandClass, { detailed: true })); + } else if (commands.length > 1) { + this.context.stdout.write(`Multiple commands match your selection: +`); + this.context.stdout.write(` +`); + let index = 0; + for (const command of this.commands) + this.context.stdout.write(this.cli.usage(this.contexts[command].commandClass, { prefix: `${index++}. `.padStart(5) })); + this.context.stdout.write(` +`); + this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. +`); + } + } +}; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/Cli.mjs +var errorCommandSymbol = Symbol(`clipanion/errorCommand`); +var Cli = class _Cli { + constructor({ binaryLabel, binaryName: binaryNameOpt = `...`, binaryVersion, enableCapture = false, enableColors } = {}) { + this.registrations = /* @__PURE__ */ new Map(); + this.builder = new CliBuilder({ binaryName: binaryNameOpt }); + this.binaryLabel = binaryLabel; + this.binaryName = binaryNameOpt; + this.binaryVersion = binaryVersion; + this.enableCapture = enableCapture; + this.enableColors = enableColors; + } + /** + * Creates a new Cli and registers all commands passed as parameters. + * + * @param commandClasses The Commands to register + * @returns The created `Cli` instance + */ + static from(commandClasses, options = {}) { + const cli = new _Cli(options); + const resolvedCommandClasses = Array.isArray(commandClasses) ? commandClasses : [commandClasses]; + for (const commandClass of resolvedCommandClasses) + cli.register(commandClass); + return cli; + } + /** + * Registers a command inside the CLI. + */ + register(commandClass) { + var _a; + const specs = /* @__PURE__ */ new Map(); + const command = new commandClass(); + for (const key in command) { + const value = command[key]; + if (typeof value === `object` && value !== null && value[Command.isOption]) { + specs.set(key, value); + } + } + const builder = this.builder.command(); + const index = builder.cliIndex; + const paths = (_a = commandClass.paths) !== null && _a !== void 0 ? _a : command.paths; + if (typeof paths !== `undefined`) + for (const path16 of paths) + builder.addPath(path16); + this.registrations.set(commandClass, { specs, builder, index }); + for (const [key, { definition }] of specs.entries()) + definition(builder, key); + builder.setContext({ + commandClass + }); + } + process(input, userContext) { + const { contexts, process: process5 } = this.builder.compile(); + const state = process5(input); + const context = { + ..._Cli.defaultContext, + ...userContext + }; + switch (state.selectedIndex) { + case HELP_COMMAND_INDEX: { + const command = HelpCommand.from(state, contexts); + command.context = context; + return command; + } + default: + { + const { commandClass } = contexts[state.selectedIndex]; + const record = this.registrations.get(commandClass); + if (typeof record === `undefined`) + throw new Error(`Assertion failed: Expected the command class to have been registered.`); + const command = new commandClass(); + command.context = context; + command.path = state.path; + try { + for (const [key, { transformer }] of record.specs.entries()) + command[key] = transformer(record.builder, key, state, context); + return command; + } catch (error) { + error[errorCommandSymbol] = command; + throw error; + } + } + break; + } + } + async run(input, userContext) { + var _a, _b; + let command; + const context = { + ..._Cli.defaultContext, + ...userContext + }; + const colored = (_a = this.enableColors) !== null && _a !== void 0 ? _a : context.colorDepth > 1; + if (!Array.isArray(input)) { + command = input; + } else { + try { + command = this.process(input, context); + } catch (error) { + context.stdout.write(this.error(error, { colored })); + return 1; + } + } + if (command.help) { + context.stdout.write(this.usage(command, { colored, detailed: true })); + return 0; + } + command.context = context; + command.cli = { + binaryLabel: this.binaryLabel, + binaryName: this.binaryName, + binaryVersion: this.binaryVersion, + enableCapture: this.enableCapture, + enableColors: this.enableColors, + definitions: () => this.definitions(), + error: (error, opts) => this.error(error, opts), + format: (colored2) => this.format(colored2), + process: (input2, subContext) => this.process(input2, { ...context, ...subContext }), + run: (input2, subContext) => this.run(input2, { ...context, ...subContext }), + usage: (command2, opts) => this.usage(command2, opts) + }; + const activate = this.enableCapture ? (_b = (0, import_platform.getCaptureActivator)(context)) !== null && _b !== void 0 ? _b : noopCaptureActivator : noopCaptureActivator; + let exitCode; + try { + exitCode = await activate(() => command.validateAndExecute().catch((error) => command.catch(error).then(() => 0))); + } catch (error) { + context.stdout.write(this.error(error, { colored, command })); + return 1; + } + return exitCode; + } + async runExit(input, context) { + process.exitCode = await this.run(input, context); + } + suggest(input, partial) { + const { suggest: suggest2 } = this.builder.compile(); + return suggest2(input, partial); + } + definitions({ colored = false } = {}) { + const data = []; + for (const [commandClass, { index }] of this.registrations) { + if (typeof commandClass.usage === `undefined`) + continue; + const { usage: path16 } = this.getUsageByIndex(index, { detailed: false }); + const { usage, options } = this.getUsageByIndex(index, { detailed: true, inlineOptions: false }); + const category = typeof commandClass.usage.category !== `undefined` ? formatMarkdownish(commandClass.usage.category, { format: this.format(colored), paragraphs: false }) : void 0; + const description = typeof commandClass.usage.description !== `undefined` ? formatMarkdownish(commandClass.usage.description, { format: this.format(colored), paragraphs: false }) : void 0; + const details = typeof commandClass.usage.details !== `undefined` ? formatMarkdownish(commandClass.usage.details, { format: this.format(colored), paragraphs: true }) : void 0; + const examples = typeof commandClass.usage.examples !== `undefined` ? commandClass.usage.examples.map(([label, cli]) => [formatMarkdownish(label, { format: this.format(colored), paragraphs: false }), cli.replace(/\$0/g, this.binaryName)]) : void 0; + data.push({ path: path16, usage, category, description, details, examples, options }); + } + return data; + } + usage(command = null, { colored, detailed = false, prefix = `$ ` } = {}) { + var _a; + if (command === null) { + for (const commandClass2 of this.registrations.keys()) { + const paths = commandClass2.paths; + const isDocumented = typeof commandClass2.usage !== `undefined`; + const isExclusivelyDefault = !paths || paths.length === 0 || paths.length === 1 && paths[0].length === 0; + const isDefault = isExclusivelyDefault || ((_a = paths === null || paths === void 0 ? void 0 : paths.some((path16) => path16.length === 0)) !== null && _a !== void 0 ? _a : false); + if (isDefault) { + if (command) { + command = null; + break; + } else { + command = commandClass2; + } + } else { + if (isDocumented) { + command = null; + continue; + } + } + } + if (command) { + detailed = true; + } + } + const commandClass = command !== null && command instanceof Command ? command.constructor : command; + let result = ``; + if (!commandClass) { + const commandsByCategories = /* @__PURE__ */ new Map(); + for (const [commandClass2, { index }] of this.registrations.entries()) { + if (typeof commandClass2.usage === `undefined`) + continue; + const category = typeof commandClass2.usage.category !== `undefined` ? formatMarkdownish(commandClass2.usage.category, { format: this.format(colored), paragraphs: false }) : null; + let categoryCommands = commandsByCategories.get(category); + if (typeof categoryCommands === `undefined`) + commandsByCategories.set(category, categoryCommands = []); + const { usage } = this.getUsageByIndex(index); + categoryCommands.push({ commandClass: commandClass2, usage }); + } + const categoryNames = Array.from(commandsByCategories.keys()).sort((a, b) => { + if (a === null) + return -1; + if (b === null) + return 1; + return a.localeCompare(b, `en`, { usage: `sort`, caseFirst: `upper` }); + }); + const hasLabel = typeof this.binaryLabel !== `undefined`; + const hasVersion = typeof this.binaryVersion !== `undefined`; + if (hasLabel || hasVersion) { + if (hasLabel && hasVersion) + result += `${this.format(colored).header(`${this.binaryLabel} - ${this.binaryVersion}`)} + +`; + else if (hasLabel) + result += `${this.format(colored).header(`${this.binaryLabel}`)} +`; + else + result += `${this.format(colored).header(`${this.binaryVersion}`)} +`; + result += ` ${this.format(colored).bold(prefix)}${this.binaryName} +`; + } else { + result += `${this.format(colored).bold(prefix)}${this.binaryName} +`; + } + for (const categoryName of categoryNames) { + const commands = commandsByCategories.get(categoryName).slice().sort((a, b) => { + return a.usage.localeCompare(b.usage, `en`, { usage: `sort`, caseFirst: `upper` }); + }); + const header = categoryName !== null ? categoryName.trim() : `General commands`; + result += ` +`; + result += `${this.format(colored).header(`${header}`)} +`; + for (const { commandClass: commandClass2, usage } of commands) { + const doc = commandClass2.usage.description || `undocumented`; + result += ` +`; + result += ` ${this.format(colored).bold(usage)} +`; + result += ` ${formatMarkdownish(doc, { format: this.format(colored), paragraphs: false })}`; + } + } + result += ` +`; + result += formatMarkdownish(`You can also print more details about any of these commands by calling them with the \`-h,--help\` flag right after the command name.`, { format: this.format(colored), paragraphs: true }); + } else { + if (!detailed) { + const { usage } = this.getUsageByRegistration(commandClass); + result += `${this.format(colored).bold(prefix)}${usage} +`; + } else { + const { description = ``, details = ``, examples = [] } = commandClass.usage || {}; + if (description !== ``) { + result += formatMarkdownish(description, { format: this.format(colored), paragraphs: false }).replace(/^./, ($0) => $0.toUpperCase()); + result += ` +`; + } + if (details !== `` || examples.length > 0) { + result += `${this.format(colored).header(`Usage`)} +`; + result += ` +`; + } + const { usage, options } = this.getUsageByRegistration(commandClass, { inlineOptions: false }); + result += `${this.format(colored).bold(prefix)}${usage} +`; + if (options.length > 0) { + result += ` +`; + result += `${this.format(colored).header(`Options`)} +`; + const maxDefinitionLength = options.reduce((length, option) => { + return Math.max(length, option.definition.length); + }, 0); + result += ` +`; + for (const { definition, description: description2 } of options) { + result += ` ${this.format(colored).bold(definition.padEnd(maxDefinitionLength))} ${formatMarkdownish(description2, { format: this.format(colored), paragraphs: false })}`; + } + } + if (details !== ``) { + result += ` +`; + result += `${this.format(colored).header(`Details`)} +`; + result += ` +`; + result += formatMarkdownish(details, { format: this.format(colored), paragraphs: true }); + } + if (examples.length > 0) { + result += ` +`; + result += `${this.format(colored).header(`Examples`)} +`; + for (const [description2, example] of examples) { + result += ` +`; + result += formatMarkdownish(description2, { format: this.format(colored), paragraphs: false }); + result += `${example.replace(/^/m, ` ${this.format(colored).bold(prefix)}`).replace(/\$0/g, this.binaryName)} +`; + } + } + } + } + return result; + } + error(error, _a) { + var _b; + var { colored, command = (_b = error[errorCommandSymbol]) !== null && _b !== void 0 ? _b : null } = _a === void 0 ? {} : _a; + if (!error || typeof error !== `object` || !(`stack` in error)) + error = new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(error)})`); + let result = ``; + let name2 = error.name.replace(/([a-z])([A-Z])/g, `$1 $2`); + if (name2 === `Error`) + name2 = `Internal Error`; + result += `${this.format(colored).error(name2)}: ${error.message} +`; + const meta = error.clipanion; + if (typeof meta !== `undefined`) { + if (meta.type === `usage`) { + result += ` +`; + result += this.usage(command); + } + } else { + if (error.stack) { + result += `${error.stack.replace(/^.*\n/, ``)} +`; + } + } + return result; + } + format(colored) { + var _a; + return ((_a = colored !== null && colored !== void 0 ? colored : this.enableColors) !== null && _a !== void 0 ? _a : _Cli.defaultContext.colorDepth > 1) ? richFormat : textFormat; + } + getUsageByRegistration(klass, opts) { + const record = this.registrations.get(klass); + if (typeof record === `undefined`) + throw new Error(`Assertion failed: Unregistered command`); + return this.getUsageByIndex(record.index, opts); + } + getUsageByIndex(n, opts) { + return this.builder.getBuilderByIndex(n).usage(opts); + } +}; +Cli.defaultContext = { + env: process.env, + stdin: process.stdin, + stdout: process.stdout, + stderr: process.stderr, + colorDepth: (0, import_platform.getDefaultColorDepth)() +}; +function noopCaptureActivator(fn2) { + return fn2(); +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/index.mjs +var builtins_exports = {}; +__export(builtins_exports, { + DefinitionsCommand: () => DefinitionsCommand, + HelpCommand: () => HelpCommand2, + VersionCommand: () => VersionCommand +}); + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/definitions.mjs +var DefinitionsCommand = class extends Command { + async execute() { + this.context.stdout.write(`${JSON.stringify(this.cli.definitions(), null, 2)} +`); + } +}; +DefinitionsCommand.paths = [[`--clipanion=definitions`]]; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/help.mjs +var HelpCommand2 = class extends Command { + async execute() { + this.context.stdout.write(this.cli.usage()); + } +}; +HelpCommand2.paths = [[`-h`], [`--help`]]; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/version.mjs +var VersionCommand = class extends Command { + async execute() { + var _a; + this.context.stdout.write(`${(_a = this.cli.binaryVersion) !== null && _a !== void 0 ? _a : ``} +`); + } +}; +VersionCommand.paths = [[`-v`], [`--version`]]; + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/index.mjs +var options_exports = {}; +__export(options_exports, { + Array: () => Array2, + Boolean: () => Boolean2, + Counter: () => Counter, + Proxy: () => Proxy2, + Rest: () => Rest, + String: () => String2, + applyValidator: () => applyValidator, + cleanValidationError: () => cleanValidationError, + formatError: () => formatError, + isOptionSymbol: () => isOptionSymbol, + makeCommandOption: () => makeCommandOption, + rerouteArguments: () => rerouteArguments +}); + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Array.mjs +function Array2(descriptor, initialValueBase, optsBase) { + const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); + const { arity = 1 } = opts; + const optNames = descriptor.split(`,`); + const nameSet = new Set(optNames); + return makeCommandOption({ + definition(builder) { + builder.addOption({ + names: optNames, + arity, + hidden: opts === null || opts === void 0 ? void 0 : opts.hidden, + description: opts === null || opts === void 0 ? void 0 : opts.description, + required: opts.required + }); + }, + transformer(builder, key, state) { + let usedName; + let currentValue = typeof initialValue !== `undefined` ? [...initialValue] : void 0; + for (const { name: name2, value } of state.options) { + if (!nameSet.has(name2)) + continue; + usedName = name2; + currentValue = currentValue !== null && currentValue !== void 0 ? currentValue : []; + currentValue.push(value); + } + if (typeof currentValue !== `undefined`) { + return applyValidator(usedName !== null && usedName !== void 0 ? usedName : key, currentValue, opts.validator); + } else { + return currentValue; + } + } + }); +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Boolean.mjs +function Boolean2(descriptor, initialValueBase, optsBase) { + const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); + const optNames = descriptor.split(`,`); + const nameSet = new Set(optNames); + return makeCommandOption({ + definition(builder) { + builder.addOption({ + names: optNames, + allowBinding: false, + arity: 0, + hidden: opts.hidden, + description: opts.description, + required: opts.required + }); + }, + transformer(builer, key, state) { + let currentValue = initialValue; + for (const { name: name2, value } of state.options) { + if (!nameSet.has(name2)) + continue; + currentValue = value; + } + return currentValue; + } + }); +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Counter.mjs +function Counter(descriptor, initialValueBase, optsBase) { + const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); + const optNames = descriptor.split(`,`); + const nameSet = new Set(optNames); + return makeCommandOption({ + definition(builder) { + builder.addOption({ + names: optNames, + allowBinding: false, + arity: 0, + hidden: opts.hidden, + description: opts.description, + required: opts.required + }); + }, + transformer(builder, key, state) { + let currentValue = initialValue; + for (const { name: name2, value } of state.options) { + if (!nameSet.has(name2)) + continue; + currentValue !== null && currentValue !== void 0 ? currentValue : currentValue = 0; + if (!value) { + currentValue = 0; + } else { + currentValue += 1; + } + } + return currentValue; + } + }); +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Proxy.mjs +function Proxy2(opts = {}) { + return makeCommandOption({ + definition(builder, key) { + var _a; + builder.addProxy({ + name: (_a = opts.name) !== null && _a !== void 0 ? _a : key, + required: opts.required + }); + }, + transformer(builder, key, state) { + return state.positionals.map(({ value }) => value); + } + }); +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Rest.mjs +function Rest(opts = {}) { + return makeCommandOption({ + definition(builder, key) { + var _a; + builder.addRest({ + name: (_a = opts.name) !== null && _a !== void 0 ? _a : key, + required: opts.required + }); + }, + transformer(builder, key, state) { + const isRestPositional = (index) => { + const positional = state.positionals[index]; + if (positional.extra === NoLimits) + return true; + if (positional.extra === false && index < builder.arity.leading.length) + return true; + return false; + }; + let count = 0; + while (count < state.positionals.length && isRestPositional(count)) + count += 1; + return state.positionals.splice(0, count).map(({ value }) => value); + } + }); +} + +// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/String.mjs +function StringOption(descriptor, initialValueBase, optsBase) { + const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); + const { arity = 1 } = opts; + const optNames = descriptor.split(`,`); + const nameSet = new Set(optNames); + return makeCommandOption({ + definition(builder) { + builder.addOption({ + names: optNames, + arity: opts.tolerateBoolean ? 0 : arity, + hidden: opts.hidden, + description: opts.description, + required: opts.required + }); + }, + transformer(builder, key, state, context) { + let usedName; + let currentValue = initialValue; + if (typeof opts.env !== `undefined` && context.env[opts.env]) { + usedName = opts.env; + currentValue = context.env[opts.env]; + } + for (const { name: name2, value } of state.options) { + if (!nameSet.has(name2)) + continue; + usedName = name2; + currentValue = value; + } + if (typeof currentValue === `string`) { + return applyValidator(usedName !== null && usedName !== void 0 ? usedName : key, currentValue, opts.validator); + } else { + return currentValue; + } + } + }); +} +function StringPositional(opts = {}) { + const { required = true } = opts; + return makeCommandOption({ + definition(builder, key) { + var _a; + builder.addPositional({ + name: (_a = opts.name) !== null && _a !== void 0 ? _a : key, + required: opts.required + }); + }, + transformer(builder, key, state) { + var _a; + for (let i = 0; i < state.positionals.length; ++i) { + if (state.positionals[i].extra === NoLimits) + continue; + if (required && state.positionals[i].extra === true) + continue; + if (!required && state.positionals[i].extra === false) + continue; + const [positional] = state.positionals.splice(i, 1); + return applyValidator((_a = opts.name) !== null && _a !== void 0 ? _a : key, positional.value, opts.validator); + } + return void 0; + } + }); +} +function String2(descriptor, ...args) { + if (typeof descriptor === `string`) { + return StringOption(descriptor, ...args); + } else { + return StringPositional(descriptor); + } +} + +// package.json +var version = "0.34.5"; + +// sources/Engine.ts +var import_fs6 = __toESM(require("fs")); +var import_path5 = __toESM(require("path")); +var import_process3 = __toESM(require("process")); +var import_rcompare = __toESM(require_rcompare()); +var import_valid3 = __toESM(require_valid()); +var import_valid4 = __toESM(require_valid2()); + +// config.json +var config_default = { + definitions: { + npm: { + default: "11.6.3+sha1.3f581bca37cbdadf2be04346c0e5b0be96cdd54b", + fetchLatestFrom: { + type: "npm", + package: "npm" + }, + transparent: { + commands: [ + [ + "npm", + "init" + ], + [ + "npx" + ] + ] + }, + ranges: { + "*": { + url: "https://registry.npmjs.org/npm/-/npm-{}.tgz", + bin: { + npm: "./bin/npm-cli.js", + npx: "./bin/npx-cli.js" + }, + registry: { + type: "npm", + package: "npm" + }, + commands: { + use: [ + "npm", + "install" + ] + } + } + } + }, + pnpm: { + default: "10.23.0+sha1.b4a44ab0dc2adf2e36371d11d8eb0dc78ffc976c", + fetchLatestFrom: { + type: "npm", + package: "pnpm" + }, + transparent: { + commands: [ + [ + "pnpm", + "init" + ], + [ + "pnpx" + ], + [ + "pnpm", + "dlx" + ] + ] + }, + ranges: { + "<6.0.0": { + url: "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", + bin: { + pnpm: "./bin/pnpm.js", + pnpx: "./bin/pnpx.js" + }, + registry: { + type: "npm", + package: "pnpm" + }, + commands: { + use: [ + "pnpm", + "install" + ] + } + }, + "6.x || 7.x || 8.x || 9.x || 10.x": { + url: "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", + bin: { + pnpm: "./bin/pnpm.cjs", + pnpx: "./bin/pnpx.cjs" + }, + registry: { + type: "npm", + package: "pnpm" + }, + commands: { + use: [ + "pnpm", + "install" + ] + } + }, + ">=11.0.0": { + url: "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", + bin: { + pnpm: "./bin/pnpm.mjs", + pnpx: "./bin/pnpx.mjs" + }, + registry: { + type: "npm", + package: "pnpm" + }, + commands: { + use: [ + "pnpm", + "install" + ] + } + } + } + }, + yarn: { + default: "1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610", + fetchLatestFrom: { + type: "npm", + package: "yarn" + }, + transparent: { + default: "4.11.0+sha224.209a3e277c6bbc03df6e4206fbfcb0c1621c27ecf0688f79a0c619f0", + commands: [ + [ + "yarn", + "init" + ], + [ + "yarn", + "dlx" + ] + ] + }, + ranges: { + "<2.0.0": { + url: "https://registry.yarnpkg.com/yarn/-/yarn-{}.tgz", + bin: { + yarn: "./bin/yarn.js", + yarnpkg: "./bin/yarn.js" + }, + registry: { + type: "npm", + package: "yarn" + }, + commands: { + use: [ + "yarn", + "install" + ] + } + }, + ">=2.0.0": { + name: "yarn", + url: "https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js", + bin: [ + "yarn", + "yarnpkg" + ], + registry: { + type: "url", + url: "https://repo.yarnpkg.com/tags", + fields: { + tags: "aliases", + versions: "tags" + } + }, + npmRegistry: { + type: "npm", + package: "@yarnpkg/cli-dist", + bin: "bin/yarn.js" + }, + commands: { + use: [ + "yarn", + "install" + ] + } + } + } + } + }, + keys: { + npm: [ + { + expires: "2025-01-29T00:00:00.000Z", + keyid: "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA", + keytype: "ecdsa-sha2-nistp256", + scheme: "ecdsa-sha2-nistp256", + key: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg==" + }, + { + expires: null, + keyid: "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U", + keytype: "ecdsa-sha2-nistp256", + scheme: "ecdsa-sha2-nistp256", + key: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEY6Ya7W++7aUPzvMTrezH6Ycx3c+HOKYCcNGybJZSCJq/fd7Qa8uuAKtdIkUQtQiEKERhAmE5lMMJhP8OkDOa2g==" + } + ] + } +}; + +// sources/corepackUtils.ts +var import_crypto2 = require("crypto"); +var import_events4 = require("events"); +var import_fs4 = __toESM(require("fs")); +var import_module = __toESM(require("module")); +var import_path3 = __toESM(require("path")); +var import_range = __toESM(require_range()); +var import_semver = __toESM(require_semver()); +var import_lt = __toESM(require_lt()); +var import_parse3 = __toESM(require_parse()); +var import_promises2 = require("timers/promises"); + +// sources/debugUtils.ts +var import_debug = __toESM(require_src()); +var log = (0, import_debug.default)(`corepack`); + +// sources/folderUtils.ts +var import_fs = require("fs"); +var import_os = require("os"); +var import_path = require("path"); +var import_process = __toESM(require("process")); +var INSTALL_FOLDER_VERSION = 1; +function getCorepackHomeFolder() { + return import_process.default.env.COREPACK_HOME ?? (0, import_path.join)( + import_process.default.env.XDG_CACHE_HOME ?? import_process.default.env.LOCALAPPDATA ?? (0, import_path.join)((0, import_os.homedir)(), import_process.default.platform === `win32` ? `AppData/Local` : `.cache`), + `node/corepack` + ); +} +function getInstallFolder() { + return (0, import_path.join)( + getCorepackHomeFolder(), + `v${INSTALL_FOLDER_VERSION}` + ); +} +function getTemporaryFolder(target = (0, import_os.tmpdir)()) { + (0, import_fs.mkdirSync)(target, { recursive: true }); + while (true) { + const rnd = Math.random() * 4294967296; + const hex = rnd.toString(16).padStart(8, `0`); + const path16 = (0, import_path.join)(target, `corepack-${import_process.default.pid}-${hex}`); + try { + (0, import_fs.mkdirSync)(path16); + return path16; + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else if (error.code === `EACCES`) { + throw new UsageError(`Failed to create cache directory. Please ensure the user has write access to the target directory (${target}). If the user's home directory does not exist, create it first.`); + } else { + throw error; + } + } + } +} + +// sources/httpUtils.ts +var import_assert = __toESM(require("assert")); +var import_events = require("events"); +var import_process2 = require("process"); +var import_stream = require("stream"); + +// sources/npmRegistryUtils.ts +var import_crypto = require("crypto"); +var DEFAULT_HEADERS = { + [`Accept`]: `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8` +}; +var DEFAULT_NPM_REGISTRY_URL = `https://registry.npmjs.org`; +async function fetchAsJson2(packageName, version2) { + const npmRegistryUrl = process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL; + if (process.env.COREPACK_ENABLE_NETWORK === `0`) + throw new UsageError(`Network access disabled by the environment; can't reach npm repository ${npmRegistryUrl}`); + const headers = { ...DEFAULT_HEADERS }; + if (`COREPACK_NPM_TOKEN` in process.env) { + headers.authorization = `Bearer ${process.env.COREPACK_NPM_TOKEN}`; + } else if (`COREPACK_NPM_USERNAME` in process.env && `COREPACK_NPM_PASSWORD` in process.env) { + const encodedCreds = Buffer.from(`${process.env.COREPACK_NPM_USERNAME}:${process.env.COREPACK_NPM_PASSWORD}`, `utf8`).toString(`base64`); + headers.authorization = `Basic ${encodedCreds}`; + } + return fetchAsJson(`${npmRegistryUrl}/${packageName}${version2 ? `/${version2}` : ``}`, { headers }); +} +function verifySignature({ signatures, integrity, packageName, version: version2 }) { + if (!Array.isArray(signatures) || !signatures.length) throw new Error(`No compatible signature found in package metadata`); + const { npm: trustedKeys } = process.env.COREPACK_INTEGRITY_KEYS ? JSON.parse(process.env.COREPACK_INTEGRITY_KEYS) : config_default.keys; + let signature; + let key; + for (const k of trustedKeys) { + signature = signatures.find(({ keyid }) => keyid === k.keyid); + if (signature != null) { + key = k.key; + break; + } + } + if (signature?.sig == null) throw new UsageError(`The package was not signed by any trusted keys: ${JSON.stringify({ signatures, trustedKeys }, void 0, 2)}`); + const verifier = (0, import_crypto.createVerify)(`SHA256`); + verifier.end(`${packageName}@${version2}:${integrity}`); + const valid = verifier.verify( + `-----BEGIN PUBLIC KEY----- +${key} +-----END PUBLIC KEY-----`, + signature.sig, + `base64` + ); + if (!valid) { + throw new Error(`Signature does not match`); + } +} +async function fetchLatestStableVersion(packageName) { + const metadata = await fetchAsJson2(packageName, `latest`); + const { version: version2, dist: { integrity, signatures, shasum } } = metadata; + if (!shouldSkipIntegrityCheck()) { + try { + verifySignature({ + packageName, + version: version2, + integrity, + signatures + }); + } catch (cause) { + throw new Error(`Corepack cannot download the latest stable version of ${packageName}; you can disable signature verification by setting COREPACK_INTEGRITY_CHECK to 0 in your env, or instruct Corepack to use the latest stable release known by this version of Corepack by setting COREPACK_USE_LATEST to 0`, { cause }); + } + } + return `${version2}+${integrity ? `sha512.${Buffer.from(integrity.slice(7), `base64`).toString(`hex`)}` : `sha1.${shasum}`}`; +} +async function fetchAvailableTags(packageName) { + const metadata = await fetchAsJson2(packageName); + return metadata[`dist-tags`]; +} +async function fetchAvailableVersions(packageName) { + const metadata = await fetchAsJson2(packageName); + return Object.keys(metadata.versions); +} +async function fetchTarballURLAndSignature(packageName, version2) { + const versionMetadata = await fetchAsJson2(packageName, version2); + const { tarball, signatures, integrity } = versionMetadata.dist; + if (tarball === void 0 || !tarball.startsWith(`http`)) + throw new Error(`${packageName}@${version2} does not have a valid tarball.`); + return { tarball, signatures, integrity }; +} + +// sources/httpUtils.ts +async function fetch(input, init) { + if (process.env.COREPACK_ENABLE_NETWORK === `0`) + throw new UsageError(`Network access disabled by the environment; can't reach ${input}`); + const agent = await getProxyAgent(input); + if (typeof input === `string`) + input = new URL(input); + let headers = init?.headers; + const username = input.username || process.env.COREPACK_NPM_USERNAME; + const password = input.password || process.env.COREPACK_NPM_PASSWORD; + if (username || password) { + headers = { + ...headers, + authorization: `Basic ${Buffer.from(`${username}:${password}`).toString(`base64`)}` + }; + input.username = input.password = ``; + } + const registry = process.env.COREPACK_NPM_TOKEN && new URL(process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL); + if (registry && input.origin === registry.origin) { + headers = { + ...headers, + authorization: `Bearer ${process.env.COREPACK_NPM_TOKEN}` + }; + } + let response; + try { + response = await globalThis.fetch(input, { + ...init, + dispatcher: agent, + headers + }); + } catch (error) { + throw new Error( + `Error when performing the request to ${input}; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting`, + { cause: error } + ); + } + if (!response.ok) { + await response.arrayBuffer(); + throw new Error( + `Server answered with HTTP ${response.status} when performing the request to ${input}; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting` + ); + } + return response; +} +async function fetchAsJson(input, init) { + const response = await fetch(input, init); + return response.json(); +} +async function fetchUrlStream(input, init) { + if (process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT === `1`) { + console.error(`! Corepack is about to download ${input}`); + if (import_process2.stdin.isTTY && !process.env.CI) { + import_process2.stderr.write(`? Do you want to continue? [Y/n] `); + import_process2.stdin.resume(); + const chars = await (0, import_events.once)(import_process2.stdin, `data`); + import_process2.stdin.pause(); + if (chars[0][0] === 110 || chars[0][0] === 78) + throw new UsageError(`Aborted by the user`); + console.error(); + } + } + const response = await fetch(input, init); + const webStream = response.body; + (0, import_assert.default)(webStream, `Expected stream to be set`); + const stream = import_stream.Readable.fromWeb(webStream); + return stream; +} +var ProxyAgent; +async function getProxyAgent(input) { + const { getProxyForUrl } = await Promise.resolve().then(() => __toESM(require_proxy_from_env())); + const proxy = getProxyForUrl(input); + if (!proxy) return void 0; + if (ProxyAgent == null) { + const [api, Dispatcher, _ProxyAgent] = await Promise.all([ + // @ts-expect-error internal module is untyped + Promise.resolve().then(() => __toESM(require_api())), + // @ts-expect-error internal module is untyped + Promise.resolve().then(() => __toESM(require_dispatcher())), + // @ts-expect-error internal module is untyped + Promise.resolve().then(() => __toESM(require_proxy_agent())) + ]); + Object.assign(Dispatcher.default.prototype, api.default); + ProxyAgent = _ProxyAgent.default; + } + return new ProxyAgent(proxy); +} + +// sources/nodeUtils.ts +var import_os2 = __toESM(require("os")); +function isNodeError(err) { + return !!err?.code; +} +function isExistError(err) { + return err.code === `EEXIST` || err.code === `ENOTEMPTY`; +} +function getEndOfLine(content) { + const matches = content.match(/\r?\n/g); + if (matches === null) + return import_os2.default.EOL; + const crlf = matches.filter((nl) => nl === `\r +`).length; + const lf = matches.length - crlf; + return crlf > lf ? `\r +` : ` +`; +} +function normalizeLineEndings(originalContent, newContent) { + return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); +} +function getIndent(content) { + const indentMatch = content.match(/^[ \t]+/m); + if (indentMatch) { + return indentMatch[0]; + } else { + return ` `; + } +} +function stripBOM(content) { + if (content.charCodeAt(0) === 65279) { + return content.slice(1); + } else { + return content; + } +} +function readPackageJson(content) { + return { + data: JSON.parse(stripBOM(content) || `{}`), + indent: getIndent(content) + }; +} + +// sources/corepackUtils.ts +var YARN_SWITCH_REGEX = /[/\\]switch[/\\]bin[/\\]/; +function isYarnSwitchPath(p) { + return YARN_SWITCH_REGEX.test(p); +} +function getRegistryFromPackageManagerSpec(spec) { + return process.env.COREPACK_NPM_REGISTRY ? spec.npmRegistry ?? spec.registry : spec.registry; +} +async function fetchLatestStableVersion2(spec) { + switch (spec.type) { + case `npm`: { + return await fetchLatestStableVersion(spec.package); + } + case `url`: { + const data = await fetchAsJson(spec.url); + return data[spec.fields.tags].stable; + } + default: { + throw new Error(`Unsupported specification ${JSON.stringify(spec)}`); + } + } +} +async function fetchAvailableTags2(spec) { + switch (spec.type) { + case `npm`: { + return await fetchAvailableTags(spec.package); + } + case `url`: { + const data = await fetchAsJson(spec.url); + return data[spec.fields.tags]; + } + default: { + throw new Error(`Unsupported specification ${JSON.stringify(spec)}`); + } + } +} +async function fetchAvailableVersions2(spec) { + switch (spec.type) { + case `npm`: { + return await fetchAvailableVersions(spec.package); + } + case `url`: { + const data = await fetchAsJson(spec.url); + const field = data[spec.fields.versions]; + return Array.isArray(field) ? field : Object.keys(field); + } + default: { + throw new Error(`Unsupported specification ${JSON.stringify(spec)}`); + } + } +} +async function findInstalledVersion(installTarget, descriptor) { + const installFolder = import_path3.default.join(installTarget, descriptor.name); + let cacheDirectory; + try { + cacheDirectory = await import_fs4.default.promises.opendir(installFolder); + } catch (error) { + if (isNodeError(error) && error.code === `ENOENT`) { + return null; + } else { + throw error; + } + } + const range = new import_range.default(descriptor.range); + let bestMatch = null; + let maxSV = void 0; + for await (const { name: name2 } of cacheDirectory) { + if (name2.startsWith(`.`)) + continue; + if (range.test(name2) && maxSV?.compare(name2) !== 1) { + bestMatch = name2; + maxSV = new import_semver.default(bestMatch); + } + } + return bestMatch; +} +function isSupportedPackageManagerDescriptor(descriptor) { + return !URL.canParse(descriptor.range); +} +function isSupportedPackageManagerLocator(locator) { + return !URL.canParse(locator.reference); +} +function parseURLReference(locator) { + const { hash, href } = new URL(locator.reference); + if (hash) { + return { + version: encodeURIComponent(href.slice(0, -hash.length)), + build: hash.slice(1).split(`.`) + }; + } + return { version: encodeURIComponent(href), build: [] }; +} +function isValidBinList(x) { + return Array.isArray(x) && x.length > 0; +} +function isValidBinSpec(x) { + return typeof x === `object` && x !== null && !Array.isArray(x) && Object.keys(x).length > 0; +} +async function download(installTarget, url, algo, binPath = null) { + const tmpFolder = getTemporaryFolder(installTarget); + log(`Downloading to ${tmpFolder}`); + const stream = await fetchUrlStream(url); + const parsedUrl = new URL(url); + const ext = import_path3.default.posix.extname(parsedUrl.pathname); + let outputFile = null; + let sendTo; + if (ext === `.tgz`) { + const { extract: tarX } = await Promise.resolve().then(() => (init_extract(), extract_exports)); + sendTo = tarX({ + strip: 1, + cwd: tmpFolder, + filter: binPath ? (path16) => { + const pos2 = path16.indexOf(`/`); + return pos2 !== -1 && path16.slice(pos2 + 1) === binPath; + } : void 0 + }); + } else if (ext === `.js`) { + outputFile = import_path3.default.join(tmpFolder, import_path3.default.posix.basename(parsedUrl.pathname)); + sendTo = import_fs4.default.createWriteStream(outputFile); + } + stream.pipe(sendTo); + let hash = !binPath ? stream.pipe((0, import_crypto2.createHash)(algo)) : null; + await (0, import_events4.once)(sendTo, `finish`); + if (binPath) { + const downloadedBin = import_path3.default.join(tmpFolder, binPath); + outputFile = import_path3.default.join(tmpFolder, import_path3.default.basename(downloadedBin)); + try { + await renameSafe(downloadedBin, outputFile); + } catch (err) { + if (isNodeError(err) && err.code === `ENOENT`) + throw new Error(`Cannot locate '${binPath}' in downloaded tarball`, { cause: err }); + if (isNodeError(err) && isExistError(err)) { + await import_fs4.default.promises.rm(downloadedBin); + } else { + throw err; + } + } + const fileStream = import_fs4.default.createReadStream(outputFile); + hash = fileStream.pipe((0, import_crypto2.createHash)(algo)); + await (0, import_events4.once)(fileStream, `close`); + } + return { + tmpFolder, + outputFile, + hash: hash.digest(`hex`) + }; +} +async function installVersion(installTarget, locator, { spec }) { + const locatorIsASupportedPackageManager = isSupportedPackageManagerLocator(locator); + const locatorReference = locatorIsASupportedPackageManager ? (0, import_parse3.default)(locator.reference) : parseURLReference(locator); + const { version: version2, build } = locatorReference; + const installFolder = import_path3.default.join(installTarget, locator.name, version2); + try { + const corepackFile = import_path3.default.join(installFolder, `.corepack`); + const corepackContent = await import_fs4.default.promises.readFile(corepackFile, `utf8`); + const corepackData = JSON.parse(corepackContent); + log(`Reusing ${locator.name}@${locator.reference} found in ${installFolder}`); + return { + hash: corepackData.hash, + location: installFolder, + bin: corepackData.bin + }; + } catch (err) { + if (isNodeError(err) && err.code !== `ENOENT`) { + throw err; + } + } + let url; + let signatures; + let integrity; + let binPath = null; + if (locatorIsASupportedPackageManager) { + url = spec.url.replace(`{}`, version2); + if (process.env.COREPACK_NPM_REGISTRY) { + const registry = getRegistryFromPackageManagerSpec(spec); + if (registry.type === `npm`) { + ({ tarball: url, signatures, integrity } = await fetchTarballURLAndSignature(registry.package, version2)); + if (registry.bin) { + binPath = registry.bin; + } + } + url = url.replace( + DEFAULT_NPM_REGISTRY_URL, + () => process.env.COREPACK_NPM_REGISTRY + ); + } + } else { + url = decodeURIComponent(version2); + if (process.env.COREPACK_NPM_REGISTRY && url.startsWith(DEFAULT_NPM_REGISTRY_URL)) { + url = url.replace( + DEFAULT_NPM_REGISTRY_URL, + () => process.env.COREPACK_NPM_REGISTRY + ); + } + } + log(`Installing ${locator.name}@${version2} from ${url}`); + const algo = build[0] ?? `sha512`; + const { tmpFolder, outputFile, hash: actualHash } = await download(installTarget, url, algo, binPath); + let bin; + const isSingleFile = outputFile !== null; + if (isSingleFile) { + if (locatorIsASupportedPackageManager && isValidBinList(spec.bin)) { + bin = spec.bin; + } else { + bin = [locator.name]; + } + } else { + if (locatorIsASupportedPackageManager && isValidBinSpec(spec.bin)) { + bin = spec.bin; + } else { + const { name: packageName, bin: packageBin } = require(import_path3.default.join(tmpFolder, `package.json`)); + if (typeof packageBin === `string`) { + bin = { [packageName]: packageBin }; + } else if (isValidBinSpec(packageBin)) { + bin = packageBin; + } else { + throw new Error(`Unable to locate bin in package.json`); + } + } + } + if (!build[1]) { + const registry = getRegistryFromPackageManagerSpec(spec); + if (registry.type === `npm` && !registry.bin && !shouldSkipIntegrityCheck()) { + if (signatures == null || integrity == null) + ({ signatures, integrity } = await fetchTarballURLAndSignature(registry.package, version2)); + verifySignature({ signatures, integrity, packageName: registry.package, version: version2 }); + build[1] = Buffer.from(integrity.slice(`sha512-`.length), `base64`).toString(`hex`); + } + } + if (build[1] && actualHash !== build[1]) + throw new Error(`Mismatch hashes. Expected ${build[1]}, got ${actualHash}`); + const serializedHash = `${algo}.${actualHash}`; + await import_fs4.default.promises.writeFile(import_path3.default.join(tmpFolder, `.corepack`), JSON.stringify({ + locator, + bin, + hash: serializedHash + })); + await import_fs4.default.promises.mkdir(import_path3.default.dirname(installFolder), { recursive: true }); + try { + await renameSafe(tmpFolder, installFolder); + } catch (err) { + if (isNodeError(err) && (isExistError(err) || // On Windows the error code is EPERM so we check if it is a directory + err.code === `EPERM` && (await import_fs4.default.promises.stat(installFolder)).isDirectory())) { + log(`Another instance of corepack installed ${locator.name}@${locator.reference}`); + await import_fs4.default.promises.rm(tmpFolder, { recursive: true, force: true }); + } else { + throw err; + } + } + if (locatorIsASupportedPackageManager && process.env.COREPACK_DEFAULT_TO_LATEST !== `0`) { + const lastKnownGood = await getLastKnownGood(); + const defaultVersion = getLastKnownGoodFromFileContent(lastKnownGood, locator.name); + if (defaultVersion) { + const currentDefault = (0, import_parse3.default)(defaultVersion); + const downloadedVersion = locatorReference; + if (currentDefault.major === downloadedVersion.major && (0, import_lt.default)(currentDefault, downloadedVersion)) { + await activatePackageManager(lastKnownGood, locator); + } + } + } + log(`Download and install of ${locator.name}@${locator.reference} is finished`); + return { + location: installFolder, + bin, + hash: serializedHash + }; +} +async function renameSafe(oldPath, newPath) { + if (process.platform === `win32`) { + await renameUnderWindows(oldPath, newPath); + } else { + await import_fs4.default.promises.rename(oldPath, newPath); + } +} +async function renameUnderWindows(oldPath, newPath) { + const retries = 5; + for (let i = 0; i < retries; i++) { + try { + await import_fs4.default.promises.rename(oldPath, newPath); + break; + } catch (err) { + if (isNodeError(err) && (err.code === `ENOENT` || err.code === `EPERM`) && i < retries - 1) { + await (0, import_promises2.setTimeout)(100 * 2 ** i); + continue; + } else { + throw err; + } + } + } +} +async function runVersion(locator, installSpec, binName, args) { + let binPath = null; + const bin = installSpec.bin ?? installSpec.spec.bin; + if (Array.isArray(bin)) { + if (bin.some((name2) => name2 === binName)) { + const parsedUrl = new URL(installSpec.spec.url); + const ext = import_path3.default.posix.extname(parsedUrl.pathname); + if (ext === `.js`) { + binPath = import_path3.default.join(installSpec.location, import_path3.default.posix.basename(parsedUrl.pathname)); + } + } + } else { + for (const [name2, dest] of Object.entries(bin)) { + if (name2 === binName) { + binPath = import_path3.default.join(installSpec.location, dest); + break; + } + } + } + if (!binPath) + throw new Error(`Assertion failed: Unable to locate path for bin '${binName}'`); + if (!import_module.default.enableCompileCache) { + if (locator.name !== `npm` || (0, import_lt.default)(locator.reference, `9.7.0`)) { + await Promise.resolve().then(() => __toESM(require_v8_compile_cache())); + } + } + process.env.COREPACK_ROOT = import_path3.default.dirname(require.resolve("corepack/package.json")); + process.argv = [ + process.execPath, + binPath, + ...args + ]; + process.execArgv = []; + process.mainModule = void 0; + process.nextTick(import_module.default.runMain, binPath); + if (import_module.default.flushCompileCache) { + setImmediate(import_module.default.flushCompileCache); + } +} +function shouldSkipIntegrityCheck() { + return process.env.COREPACK_INTEGRITY_KEYS === `` || process.env.COREPACK_INTEGRITY_KEYS === `0`; +} + +// sources/semverUtils.ts +var import_range2 = __toESM(require_range()); +var import_semver2 = __toESM(require_semver()); +function satisfiesWithPrereleases(version2, range, loose = false) { + let semverRange; + try { + semverRange = new import_range2.default(range, loose); + } catch (err) { + return false; + } + if (!version2) + return false; + let semverVersion; + try { + semverVersion = new import_semver2.default(version2, semverRange.loose); + if (semverVersion.prerelease) { + semverVersion.prerelease = []; + } + } catch (err) { + return false; + } + return semverRange.set.some((comparatorSet) => { + for (const comparator of comparatorSet) + if (comparator.semver.prerelease) + comparator.semver.prerelease = []; + return comparatorSet.every((comparator) => { + return comparator.test(semverVersion); + }); + }); +} + +// sources/specUtils.ts +var import_fs5 = __toESM(require("fs")); +var import_path4 = __toESM(require("path")); +var import_satisfies = __toESM(require_satisfies()); +var import_valid = __toESM(require_valid()); +var import_valid2 = __toESM(require_valid2()); +var import_util = require("util"); + +// sources/types.ts +var SupportedPackageManagers = /* @__PURE__ */ ((SupportedPackageManagers3) => { + SupportedPackageManagers3["Npm"] = `npm`; + SupportedPackageManagers3["Pnpm"] = `pnpm`; + SupportedPackageManagers3["Yarn"] = `yarn`; + return SupportedPackageManagers3; +})(SupportedPackageManagers || {}); +var SupportedPackageManagerSet = new Set( + Object.values(SupportedPackageManagers) +); +var SupportedPackageManagerSetWithoutNpm = new Set( + Object.values(SupportedPackageManagers) +); +SupportedPackageManagerSetWithoutNpm.delete("npm" /* Npm */); +function isSupportedPackageManager(value) { + return SupportedPackageManagerSet.has(value); +} + +// sources/specUtils.ts +var nodeModulesRegExp = /[\\/]node_modules[\\/](@[^\\/]*[\\/])?([^@\\/][^\\/]*)$/; +function parseSpec(raw2, source, { enforceExactVersion = true } = {}) { + if (typeof raw2 !== `string`) + throw new UsageError(`Invalid package manager specification in ${source}; expected a string`); + const atIndex = raw2.indexOf(`@`); + if (atIndex === -1 || atIndex === raw2.length - 1) { + if (enforceExactVersion) + throw new UsageError(`No version specified for ${raw2} in "packageManager" of ${source}`); + const name3 = atIndex === -1 ? raw2 : raw2.slice(0, -1); + if (!isSupportedPackageManager(name3)) + throw new UsageError(`Unsupported package manager specification (${name3})`); + return { + name: name3, + range: `*` + }; + } + const name2 = raw2.slice(0, atIndex); + const range = raw2.slice(atIndex + 1); + const isURL = URL.canParse(range); + if (!isURL) { + if (enforceExactVersion && !(0, import_valid.default)(range)) + throw new UsageError(`Invalid package manager specification in ${source} (${raw2}); expected a semver version${enforceExactVersion ? `` : `, range, or tag`}`); + if (!isSupportedPackageManager(name2)) { + throw new UsageError(`Unsupported package manager specification (${raw2})`); + } + } else if (isSupportedPackageManager(name2) && process.env.COREPACK_ENABLE_UNSAFE_CUSTOM_URLS !== `1`) { + throw new UsageError(`Illegal use of URL for known package manager. Instead, select a specific version, or set COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 in your environment (${raw2})`); + } + return { + name: name2, + range + }; +} +function warnOrThrow(errorMessage, onFail) { + switch (onFail) { + case `ignore`: + break; + case `error`: + case void 0: + throw new UsageError(errorMessage); + default: + console.warn(`! Corepack validation warning: ${errorMessage}`); + } +} +function parsePackageJSON(packageJSONContent) { + const { packageManager: pm } = packageJSONContent; + if (packageJSONContent.devEngines?.packageManager != null) { + const { packageManager } = packageJSONContent.devEngines; + if (typeof packageManager !== `object`) { + console.warn(`! Corepack only supports objects as valid value for devEngines.packageManager. The current value (${JSON.stringify(packageManager)}) will be ignored.`); + return pm; + } + if (Array.isArray(packageManager)) { + console.warn(`! Corepack does not currently support array values for devEngines.packageManager`); + return pm; + } + const { name: name2, version: version2, onFail } = packageManager; + if (typeof name2 !== `string` || name2.includes(`@`)) { + warnOrThrow(`The value of devEngines.packageManager.name ${JSON.stringify(name2)} is not a supported string value`, onFail); + return pm; + } + if (version2 != null && (typeof version2 !== `string` || !(0, import_valid2.default)(version2))) { + warnOrThrow(`The value of devEngines.packageManager.version ${JSON.stringify(version2)} is not a valid semver range`, onFail); + return pm; + } + log(`devEngines.packageManager defines that ${name2}@${version2} is the local package manager`); + if (pm) { + if (!pm.startsWith?.(`${name2}@`)) + warnOrThrow(`"packageManager" field is set to ${JSON.stringify(pm)} which does not match the "devEngines.packageManager" field set to ${JSON.stringify(name2)}`, onFail); + else if (version2 != null && !(0, import_satisfies.default)(pm.slice(packageManager.name.length + 1), version2)) + warnOrThrow(`"packageManager" field is set to ${JSON.stringify(pm)} which does not match the value defined in "devEngines.packageManager" for ${JSON.stringify(name2)} of ${JSON.stringify(version2)}`, onFail); + return pm; + } + return `${name2}@${version2 ?? `*`}`; + } + return pm; +} +async function setLocalPackageManager(cwd, info) { + const lookup = await loadSpec(cwd); + const range = `range` in lookup && lookup.range; + if (range) { + if (info.locator.name !== range.name || !(0, import_satisfies.default)(info.locator.reference, range.range)) { + warnOrThrow(`The requested version of ${info.locator.name}@${info.locator.reference} does not match the devEngines specification (${range.name}@${range.range})`, range.onFail); + } + } + const content = lookup.type !== `NoProject` ? await import_fs5.default.promises.readFile(lookup.target, `utf8`) : ``; + const { data, indent } = readPackageJson(content); + const previousPackageManager = data.packageManager ?? (range ? `${range.name}@${range.range}` : `unknown`); + data.packageManager = `${info.locator.name}@${info.locator.reference}`; + const newContent = normalizeLineEndings(content, `${JSON.stringify(data, null, indent)} +`); + await import_fs5.default.promises.writeFile(lookup.target, newContent, `utf8`); + return { + previousPackageManager + }; +} +async function loadSpec(initialCwd) { + let nextCwd = initialCwd; + let currCwd = ``; + let selection = null; + while (nextCwd !== currCwd && (!selection || !selection.data.packageManager)) { + currCwd = nextCwd; + nextCwd = import_path4.default.dirname(currCwd); + if (nodeModulesRegExp.test(currCwd)) + continue; + const manifestPath = import_path4.default.join(currCwd, `package.json`); + log(`Checking ${manifestPath}`); + let content; + try { + content = await import_fs5.default.promises.readFile(manifestPath, `utf8`); + } catch (err) { + if (err?.code === `ENOENT`) continue; + throw err; + } + let data; + try { + data = JSON.parse(content); + } catch { + } + if (typeof data !== `object` || data === null) + throw new UsageError(`Invalid package.json in ${import_path4.default.relative(initialCwd, manifestPath)}`); + let localEnv; + const envFilePath2 = import_path4.default.resolve(currCwd, process.env.COREPACK_ENV_FILE ?? `.corepack.env`); + if (process.env.COREPACK_ENV_FILE == `0`) { + log(`Skipping env file as configured with COREPACK_ENV_FILE`); + localEnv = process.env; + } else if (typeof import_util.parseEnv !== `function`) { + log(`Skipping env file as it is not supported by the current version of Node.js`); + localEnv = process.env; + } else { + log(`Checking ${envFilePath2}`); + try { + localEnv = { + ...Object.fromEntries(Object.entries((0, import_util.parseEnv)(await import_fs5.default.promises.readFile(envFilePath2, `utf8`))).filter((e) => e[0].startsWith(`COREPACK_`))), + ...process.env + }; + log(`Successfully loaded env file found at ${envFilePath2}`); + } catch (err) { + if (err?.code !== `ENOENT`) + throw err; + log(`No env file found at ${envFilePath2}`); + localEnv = process.env; + } + } + selection = { data, manifestPath, localEnv, envFilePath: envFilePath2 }; + } + if (selection === null) + return { type: `NoProject`, target: import_path4.default.join(initialCwd, `package.json`) }; + let envFilePath; + if (selection.localEnv !== process.env) { + envFilePath = selection.envFilePath; + process.env = selection.localEnv; + } + const rawPmSpec = parsePackageJSON(selection.data); + if (typeof rawPmSpec === `undefined`) + return { type: `NoSpec`, target: selection.manifestPath }; + log(`${selection.manifestPath} defines ${rawPmSpec} as local package manager`); + return { + type: `Found`, + target: selection.manifestPath, + envFilePath, + range: selection.data.devEngines?.packageManager?.version && { + name: selection.data.devEngines.packageManager.name, + range: selection.data.devEngines.packageManager.version, + onFail: selection.data.devEngines.packageManager.onFail + }, + // Lazy-loading it so we do not throw errors on commands that do not need valid spec. + getSpec: ({ enforceExactVersion = true } = {}) => parseSpec(rawPmSpec, import_path4.default.relative(initialCwd, selection.manifestPath), { enforceExactVersion }) + }; +} + +// sources/Engine.ts +function getLastKnownGoodFilePath() { + const lkg = import_path5.default.join(getCorepackHomeFolder(), `lastKnownGood.json`); + log(`LastKnownGood file would be located at ${lkg}`); + return lkg; +} +async function getLastKnownGood() { + let raw2; + try { + raw2 = await import_fs6.default.promises.readFile(getLastKnownGoodFilePath(), `utf8`); + } catch (err) { + if (err?.code === `ENOENT`) { + log(`No LastKnownGood version found in Corepack home.`); + return {}; + } + throw err; + } + try { + const parsed = JSON.parse(raw2); + if (!parsed) { + log(`Invalid LastKnowGood file in Corepack home (JSON parsable, but falsy)`); + return {}; + } + if (typeof parsed !== `object`) { + log(`Invalid LastKnowGood file in Corepack home (JSON parsable, but non-object)`); + return {}; + } + Object.entries(parsed).forEach(([key, value]) => { + if (typeof value !== `string`) { + log(`Ignoring key ${key} in LastKnownGood file as its value is not a string`); + delete parsed[key]; + } + }); + return parsed; + } catch { + log(`Invalid LastKnowGood file in Corepack home (maybe not JSON parsable)`); + return {}; + } +} +async function createLastKnownGoodFile(lastKnownGood) { + const content = `${JSON.stringify(lastKnownGood, null, 2)} +`; + await import_fs6.default.promises.mkdir(getCorepackHomeFolder(), { recursive: true }); + await import_fs6.default.promises.writeFile(getLastKnownGoodFilePath(), content, `utf8`); +} +function getLastKnownGoodFromFileContent(lastKnownGood, packageManager) { + if (Object.hasOwn(lastKnownGood, packageManager)) + return lastKnownGood[packageManager]; + return void 0; +} +async function activatePackageManager(lastKnownGood, locator) { + if (lastKnownGood[locator.name] === locator.reference) { + log(`${locator.name}@${locator.reference} is already Last Known Good version`); + return; + } + lastKnownGood[locator.name] = locator.reference; + log(`Setting ${locator.name}@${locator.reference} as Last Known Good version`); + await createLastKnownGoodFile(lastKnownGood); +} +var Engine = class { + constructor(config = config_default) { + this.config = config; + } + getPackageManagerFor(binaryName) { + for (const packageManager of SupportedPackageManagerSet) { + for (const rangeDefinition of Object.values(this.config.definitions[packageManager].ranges)) { + const bins = Array.isArray(rangeDefinition.bin) ? rangeDefinition.bin : Object.keys(rangeDefinition.bin); + if (bins.includes(binaryName)) { + return packageManager; + } + } + } + return null; + } + getPackageManagerSpecFor(locator) { + if (!isSupportedPackageManagerLocator(locator)) { + const url = `${locator.reference}`; + return { + url, + bin: void 0, + // bin will be set later + registry: { + type: `url`, + url, + fields: { + tags: ``, + versions: `` + } + } + }; + } + const definition = this.config.definitions[locator.name]; + if (typeof definition === `undefined`) + throw new UsageError(`This package manager (${locator.name}) isn't supported by this corepack build`); + const ranges = Object.keys(definition.ranges).reverse(); + const range = ranges.find((range2) => satisfiesWithPrereleases(locator.reference, range2)); + if (typeof range === `undefined`) + throw new Error(`Assertion failed: Specified resolution (${locator.reference}) isn't supported by any of ${ranges.join(`, `)}`); + return definition.ranges[range]; + } + getBinariesFor(name2) { + const binNames = /* @__PURE__ */ new Set(); + for (const rangeDefinition of Object.values(this.config.definitions[name2].ranges)) { + const bins = Array.isArray(rangeDefinition.bin) ? rangeDefinition.bin : Object.keys(rangeDefinition.bin); + for (const name3 of bins) { + binNames.add(name3); + } + } + return binNames; + } + async getDefaultDescriptors() { + const locators = []; + for (const name2 of SupportedPackageManagerSet) + locators.push({ name: name2, range: await this.getDefaultVersion(name2) }); + return locators; + } + async getDefaultVersion(packageManager) { + const definition = this.config.definitions[packageManager]; + if (typeof definition === `undefined`) + throw new UsageError(`This package manager (${packageManager}) isn't supported by this corepack build`); + const lastKnownGood = await getLastKnownGood(); + const lastKnownGoodForThisPackageManager = getLastKnownGoodFromFileContent(lastKnownGood, packageManager); + if (lastKnownGoodForThisPackageManager) { + log(`Search for default version: Found ${packageManager}@${lastKnownGoodForThisPackageManager} in LastKnownGood file`); + return lastKnownGoodForThisPackageManager; + } + if (import_process3.default.env.COREPACK_DEFAULT_TO_LATEST === `0`) { + log(`Search for default version: As defined in environment, defaulting to internal config ${packageManager}@${definition.default}`); + return definition.default; + } + const reference = await fetchLatestStableVersion2(definition.fetchLatestFrom); + log(`Search for default version: found in remote registry ${packageManager}@${reference}`); + try { + await activatePackageManager(lastKnownGood, { + name: packageManager, + reference + }); + } catch { + log(`Search for default version: could not activate registry version`); + } + return reference; + } + async activatePackageManager(locator) { + const lastKnownGood = await getLastKnownGood(); + await activatePackageManager(lastKnownGood, locator); + } + async ensurePackageManager(locator) { + const spec = this.getPackageManagerSpecFor(locator); + const packageManagerInfo = await installVersion(getInstallFolder(), locator, { + spec + }); + const noHashReference = locator.reference.replace(/\+.*/, ``); + const fixedHashReference = `${noHashReference}+${packageManagerInfo.hash}`; + const fixedHashLocator = { + name: locator.name, + reference: fixedHashReference + }; + return { + ...packageManagerInfo, + locator: fixedHashLocator, + spec + }; + } + /** + * Locates the active project's package manager specification. + * + * If the specification exists but doesn't match the active package manager, + * an error is thrown to prevent users from using the wrong package manager, + * which would lead to inconsistent project layouts. + * + * If the project doesn't include a specification file, we just assume that + * whatever the user uses is exactly what they want to use. Since the version + * isn't specified, we fallback on known good versions. + * + * Finally, if the project doesn't exist at all, we ask the user whether they + * want to create one in the current project. If they do, we initialize a new + * project using the default package managers, and configure it so that we + * don't need to ask again in the future. + */ + async findProjectSpec(initialCwd, locator, { transparent = false, binaryVersion } = {}) { + const fallbackDescriptor = { name: locator.name, range: `${locator.reference}` }; + if (import_process3.default.env.COREPACK_ENABLE_PROJECT_SPEC === `0`) { + if (typeof locator.reference === `function`) + fallbackDescriptor.range = await locator.reference(); + return fallbackDescriptor; + } + if (import_process3.default.env.COREPACK_ENABLE_STRICT === `0`) + transparent = true; + while (true) { + const result = await loadSpec(initialCwd); + switch (result.type) { + case `NoProject`: { + if (typeof locator.reference === `function`) + fallbackDescriptor.range = await locator.reference(); + log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} as no project manifest were found`); + return fallbackDescriptor; + } + case `NoSpec`: { + if (typeof locator.reference === `function`) + fallbackDescriptor.range = await locator.reference(); + if (import_process3.default.env.COREPACK_ENABLE_AUTO_PIN === `1`) { + const resolved = await this.resolveDescriptor(fallbackDescriptor, { allowTags: true }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${fallbackDescriptor.range}' to a valid ${fallbackDescriptor.name} release`); + const installSpec = await this.ensurePackageManager(resolved); + console.error(`! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing ${installSpec.locator.name}@${installSpec.locator.reference}.`); + console.error(`! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager`); + console.error(); + await setLocalPackageManager(import_path5.default.dirname(result.target), installSpec); + } + log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in the absence of "packageManager" field in ${result.target}`); + return fallbackDescriptor; + } + case `Found`: { + const spec = result.getSpec({ enforceExactVersion: !binaryVersion }); + if (spec.name !== locator.name) { + if (transparent) { + if (typeof locator.reference === `function`) + fallbackDescriptor.range = await locator.reference(); + log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in a ${spec.name}@${spec.range} project`); + return fallbackDescriptor; + } else { + throw new UsageError(`This project is configured to use ${spec.name} because ${result.target} has a "packageManager" field`); + } + } else { + log(`Using ${spec.name}@${spec.range} as defined in project manifest ${result.target}`); + return spec; + } + } + } + } + } + async executePackageManagerRequest({ packageManager, binaryName, binaryVersion }, { cwd, args }) { + let fallbackLocator = { + name: binaryName, + reference: void 0 + }; + let isTransparentCommand = false; + if (packageManager != null) { + const defaultVersion = binaryVersion || (() => this.getDefaultVersion(packageManager)); + const definition = this.config.definitions[packageManager]; + for (const transparentPath of definition.transparent.commands) { + if (transparentPath[0] === binaryName && transparentPath.slice(1).every((segment, index) => segment === args[index])) { + isTransparentCommand = true; + break; + } + } + const fallbackReference = isTransparentCommand ? definition.transparent.default ?? defaultVersion : defaultVersion; + fallbackLocator = { + name: packageManager, + reference: fallbackReference + }; + } + const descriptor = await this.findProjectSpec(cwd, fallbackLocator, { transparent: isTransparentCommand, binaryVersion }); + if (binaryVersion) + descriptor.range = binaryVersion; + const resolved = await this.resolveDescriptor(descriptor, { allowTags: true }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); + const installSpec = await this.ensurePackageManager(resolved); + return await runVersion(resolved, installSpec, binaryName, args); + } + async resolveDescriptor(descriptor, { allowTags = false, useCache = true } = {}) { + if (!isSupportedPackageManagerDescriptor(descriptor)) { + if (import_process3.default.env.COREPACK_ENABLE_UNSAFE_CUSTOM_URLS !== `1` && isSupportedPackageManager(descriptor.name)) + throw new UsageError(`Illegal use of URL for known package manager. Instead, select a specific version, or set COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 in your environment (${descriptor.name}@${descriptor.range})`); + return { + name: descriptor.name, + reference: descriptor.range + }; + } + const definition = this.config.definitions[descriptor.name]; + if (typeof definition === `undefined`) + throw new UsageError(`This package manager (${descriptor.name}) isn't supported by this corepack build`); + let finalDescriptor = descriptor; + if (!(0, import_valid3.default)(descriptor.range) && !(0, import_valid4.default)(descriptor.range)) { + if (!allowTags) + throw new UsageError(`Packages managers can't be referenced via tags in this context`); + const ranges = Object.keys(definition.ranges); + const tagRange = ranges[ranges.length - 1]; + const packageManagerSpec = definition.ranges[tagRange]; + const registry = getRegistryFromPackageManagerSpec(packageManagerSpec); + const tags = await fetchAvailableTags2(registry); + if (!Object.hasOwn(tags, descriptor.range)) + throw new UsageError(`Tag not found (${descriptor.range})`); + finalDescriptor = { + name: descriptor.name, + range: tags[descriptor.range] + }; + } + const cachedVersion = await findInstalledVersion(getInstallFolder(), finalDescriptor); + if (cachedVersion !== null && useCache) + return { name: finalDescriptor.name, reference: cachedVersion }; + if ((0, import_valid3.default)(finalDescriptor.range)) + return { name: finalDescriptor.name, reference: finalDescriptor.range }; + const versions = await Promise.all(Object.keys(definition.ranges).map(async (range) => { + const packageManagerSpec = definition.ranges[range]; + const registry = getRegistryFromPackageManagerSpec(packageManagerSpec); + const versions2 = await fetchAvailableVersions2(registry); + return versions2.filter((version2) => satisfiesWithPrereleases(version2, finalDescriptor.range)); + })); + const highestVersion = [...new Set(versions.flat())].sort(import_rcompare.default); + if (highestVersion.length === 0) + return null; + return { name: finalDescriptor.name, reference: highestVersion[0] }; + } +}; + +// sources/commands/Cache.ts +var import_fs7 = __toESM(require("fs")); +var CacheCommand = class extends Command { + static paths = [ + [`cache`, `clean`], + [`cache`, `clear`] + ]; + static usage = Command.Usage({ + description: `Cleans Corepack cache`, + details: ` + Removes Corepack cache directory from your local disk. + ` + }); + async execute() { + await import_fs7.default.promises.rm(getInstallFolder(), { recursive: true, force: true }); + } +}; + +// sources/commands/Disable.ts +var import_fs8 = __toESM(require("fs")); +var import_path6 = __toESM(require("path")); +var import_which = __toESM(require_lib()); +var DisableCommand = class extends Command { + static paths = [ + [`disable`] + ]; + static usage = Command.Usage({ + description: `Remove the Corepack shims from the install directory`, + details: ` + When run, this command will remove the shims for the specified package managers from the install directory, or all shims if no parameters are passed. + + By default it will locate the install directory by running the equivalent of \`which corepack\`, but this can be tweaked by explicitly passing the install directory via the \`--install-directory\` flag. + `, + examples: [[ + `Disable all shims, removing them if they're next to the \`coreshim\` binary`, + `$0 disable` + ], [ + `Disable all shims, removing them from the specified directory`, + `$0 disable --install-directory /path/to/bin` + ], [ + `Disable the Yarn shim only`, + `$0 disable yarn` + ]] + }); + installDirectory = options_exports.String(`--install-directory`, { + description: `Where the shims are located` + }); + names = options_exports.Rest(); + async execute() { + let installDirectory = this.installDirectory; + if (typeof installDirectory === `undefined`) + installDirectory = import_path6.default.dirname(await (0, import_which.default)(`corepack`)); + const names = this.names.length === 0 ? SupportedPackageManagerSetWithoutNpm : this.names; + const allBinNames = []; + for (const name2 of new Set(names)) { + if (!isSupportedPackageManager(name2)) + throw new UsageError(`Invalid package manager name '${name2}'`); + const binNames = this.context.engine.getBinariesFor(name2); + allBinNames.push(...binNames); + } + const removeLink = process.platform === `win32` ? (binName) => this.removeWin32Link(installDirectory, binName) : (binName) => this.removePosixLink(installDirectory, binName); + await Promise.all(allBinNames.map(removeLink)); + } + async removePosixLink(installDirectory, binName) { + const file = import_path6.default.join(installDirectory, binName); + try { + if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs8.default.promises.realpath(file))) { + console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`); + return; + } + await import_fs8.default.promises.unlink(file); + } catch (err) { + if (err.code !== `ENOENT`) { + throw err; + } + } + } + async removeWin32Link(installDirectory, binName) { + for (const ext of [``, `.ps1`, `.cmd`]) { + const file = import_path6.default.join(installDirectory, `${binName}${ext}`); + try { + await import_fs8.default.promises.unlink(file); + } catch (err) { + if (err.code !== `ENOENT`) { + throw err; + } + } + } + } +}; + +// sources/commands/Enable.ts +var import_cmd_shim = __toESM(require_cmd_shim()); +var import_fs9 = __toESM(require("fs")); +var import_path7 = __toESM(require("path")); +var import_which2 = __toESM(require_lib()); +var EnableCommand = class extends Command { + static paths = [ + [`enable`] + ]; + static usage = Command.Usage({ + description: `Add the Corepack shims to the install directory`, + details: ` + When run, this command will check whether the shims for the specified package managers can be found with the correct values inside the install directory. If not, or if they don't exist, they will be created. + + By default it will locate the install directory by running the equivalent of \`which corepack\`, but this can be tweaked by explicitly passing the install directory via the \`--install-directory\` flag. + `, + examples: [[ + `Enable all shims, putting them next to the \`corepack\` binary`, + `$0 enable` + ], [ + `Enable all shims, putting them in the specified directory`, + `$0 enable --install-directory /path/to/folder` + ], [ + `Enable the Yarn shim only`, + `$0 enable yarn` + ]] + }); + installDirectory = options_exports.String(`--install-directory`, { + description: `Where the shims are to be installed` + }); + names = options_exports.Rest(); + async execute() { + let installDirectory = this.installDirectory; + if (typeof installDirectory === `undefined`) + installDirectory = import_path7.default.dirname(await (0, import_which2.default)(`corepack`)); + installDirectory = import_fs9.default.realpathSync(installDirectory); + const manifestPath = require.resolve("corepack/package.json"); + const distFolder = import_path7.default.join(import_path7.default.dirname(manifestPath), `dist`); + if (!import_fs9.default.existsSync(distFolder)) + throw new Error(`Assertion failed: The stub folder doesn't exist`); + const names = this.names.length === 0 ? SupportedPackageManagerSetWithoutNpm : this.names; + const allBinNames = []; + for (const name2 of new Set(names)) { + if (!isSupportedPackageManager(name2)) + throw new UsageError(`Invalid package manager name '${name2}'`); + const binNames = this.context.engine.getBinariesFor(name2); + allBinNames.push(...binNames); + } + const generateLink = process.platform === `win32` ? (binName) => this.generateWin32Link(installDirectory, distFolder, binName) : (binName) => this.generatePosixLink(installDirectory, distFolder, binName); + await Promise.all(allBinNames.map(generateLink)); + } + async generatePosixLink(installDirectory, distFolder, binName) { + const file = import_path7.default.join(installDirectory, binName); + const symlink = import_path7.default.relative(installDirectory, import_path7.default.join(distFolder, `${binName}.js`)); + const stats = import_fs9.default.lstatSync(file, { throwIfNoEntry: false }); + if (stats) { + if (stats.isSymbolicLink()) { + const currentSymlink = await import_fs9.default.promises.readlink(file); + if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs9.default.promises.realpath(file))) { + console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`); + return; + } + if (currentSymlink === symlink) { + return; + } + } + await import_fs9.default.promises.unlink(file); + } + await import_fs9.default.promises.symlink(symlink, file); + } + async generateWin32Link(installDirectory, distFolder, binName) { + const file = import_path7.default.join(installDirectory, binName); + await (0, import_cmd_shim.default)(import_path7.default.join(distFolder, `${binName}.js`), file, { + createCmdFile: true + }); + } +}; + +// sources/commands/InstallGlobal.ts +var import_fs10 = __toESM(require("fs")); +var import_path8 = __toESM(require("path")); + +// sources/commands/Base.ts +var BaseCommand = class extends Command { + async resolvePatternsToDescriptors({ patterns }) { + const resolvedSpecs = patterns.map((pattern) => parseSpec(pattern, `CLI arguments`, { enforceExactVersion: false })); + if (resolvedSpecs.length === 0) { + const lookup = await loadSpec(this.context.cwd); + switch (lookup.type) { + case `NoProject`: + throw new UsageError(`Couldn't find a project in the local directory - please specify the package manager to pack, or run this command from a valid project`); + case `NoSpec`: + throw new UsageError(`The local project doesn't feature a 'packageManager' field nor a 'devEngines.packageManager' field - please specify the package manager to pack, or update the manifest to reference it`); + default: { + return [lookup.range ?? lookup.getSpec()]; + } + } + } + return resolvedSpecs; + } + async setAndInstallLocalPackageManager(info) { + const { + previousPackageManager + } = await setLocalPackageManager(this.context.cwd, info); + const command = this.context.engine.getPackageManagerSpecFor(info.locator).commands?.use ?? null; + if (command === null) + return 0; + process.env.COREPACK_MIGRATE_FROM = previousPackageManager; + this.context.stdout.write(` +`); + const [binaryName, ...args] = command; + return await runVersion(info.locator, info, binaryName, args); + } +}; + +// sources/commands/InstallGlobal.ts +var InstallGlobalCommand = class extends BaseCommand { + static paths = [ + [`install`] + ]; + static usage = Command.Usage({ + description: `Install package managers on the system`, + details: ` + Download the selected package managers and install them on the system. + + Package managers thus installed will be configured as the new default when calling their respective binaries outside of projects defining the 'packageManager' field. + `, + examples: [[ + `Install the latest version of Yarn 1.x and make it globally available`, + `corepack install -g yarn@^1` + ], [ + `Install the latest version of pnpm, and make it globally available`, + `corepack install -g pnpm` + ]] + }); + global = options_exports.Boolean(`-g,--global`, { + required: true + }); + cacheOnly = options_exports.Boolean(`--cache-only`, false, { + description: `If true, the package managers will only be cached, not set as new defaults` + }); + args = options_exports.Rest(); + async execute() { + if (this.args.length === 0) + throw new UsageError(`No package managers specified`); + await Promise.all(this.args.map((arg) => { + if (arg.endsWith(`.tgz`)) { + return this.installFromTarball(import_path8.default.resolve(this.context.cwd, arg)); + } else { + return this.installFromDescriptor(parseSpec(arg, `CLI arguments`, { enforceExactVersion: false })); + } + })); + } + log(locator) { + if (this.cacheOnly) { + this.context.stdout.write(`Adding ${locator.name}@${locator.reference} to the cache... +`); + } else { + this.context.stdout.write(`Installing ${locator.name}@${locator.reference}... +`); + } + } + async installFromDescriptor(descriptor) { + const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true, useCache: false }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); + this.log(resolved); + await this.context.engine.ensurePackageManager(resolved); + if (!this.cacheOnly) { + await this.context.engine.activatePackageManager(resolved); + } + } + async installFromTarball(p) { + const installFolder = getInstallFolder(); + const archiveEntries = /* @__PURE__ */ new Map(); + const { list: tarT } = await Promise.resolve().then(() => (init_list(), list_exports)); + let hasShortEntries = false; + await tarT({ file: p, onentry: (entry) => { + const segments = entry.path.split(/\//g); + if (segments.length > 0 && segments[segments.length - 1] !== `.corepack`) + return; + if (segments.length < 3) { + hasShortEntries = true; + } else { + let references = archiveEntries.get(segments[0]); + if (typeof references === `undefined`) + archiveEntries.set(segments[0], references = /* @__PURE__ */ new Set()); + references.add(segments[1]); + } + } }); + if (hasShortEntries || archiveEntries.size < 1) + throw new UsageError(`Invalid archive format; did it get generated by 'corepack pack'?`); + const { extract: tarX } = await Promise.resolve().then(() => (init_extract(), extract_exports)); + for (const [name2, references] of archiveEntries) { + for (const reference of references) { + if (!isSupportedPackageManager(name2)) + throw new UsageError(`Unsupported package manager '${name2}'`); + this.log({ name: name2, reference }); + await import_fs10.default.promises.mkdir(installFolder, { recursive: true }); + await tarX({ file: p, cwd: installFolder }, [`${name2}/${reference}`]); + if (!this.cacheOnly) { + await this.context.engine.activatePackageManager({ name: name2, reference }); + } + } + } + } +}; + +// sources/commands/InstallLocal.ts +var InstallLocalCommand = class extends BaseCommand { + static paths = [ + [`install`] + ]; + static usage = Command.Usage({ + description: `Install the package manager configured in the local project`, + details: ` + Download and install the package manager configured in the local project. This command doesn't change the global version used when running the package manager from outside the project (use the \`-g,--global\` flag if you wish to do this). + `, + examples: [[ + `Install the project's package manager in the cache`, + `corepack install` + ]] + }); + async execute() { + const [descriptor] = await this.resolvePatternsToDescriptors({ + patterns: [] + }); + const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); + this.context.stdout.write(`Adding ${resolved.name}@${resolved.reference} to the cache... +`); + await this.context.engine.ensurePackageManager(resolved); + } +}; + +// sources/commands/Pack.ts +var import_promises3 = require("fs/promises"); +var import_path11 = __toESM(require("path")); +var PackCommand = class extends BaseCommand { + static paths = [ + [`pack`] + ]; + static usage = Command.Usage({ + description: `Store package managers in a tarball`, + details: ` + Download the selected package managers and store them inside a tarball suitable for use with \`corepack install -g\`. + `, + examples: [[ + `Pack the package manager defined in the package.json file`, + `corepack pack` + ], [ + `Pack the latest version of Yarn 1.x inside a file named corepack.tgz`, + `corepack pack yarn@^1` + ]] + }); + json = options_exports.Boolean(`--json`, false, { + description: `If true, the path to the generated tarball will be printed on stdout` + }); + output = options_exports.String(`-o,--output`, { + description: `Where the tarball should be generated; by default "corepack.tgz"` + }); + patterns = options_exports.Rest(); + async execute() { + const descriptors = await this.resolvePatternsToDescriptors({ + patterns: this.patterns + }); + const installLocations = []; + for (const descriptor of descriptors) { + const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true, useCache: false }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); + this.context.stdout.write(`Adding ${resolved.name}@${resolved.reference} to the cache... +`); + const packageManagerInfo = await this.context.engine.ensurePackageManager(resolved); + await this.context.engine.activatePackageManager(packageManagerInfo.locator); + installLocations.push(packageManagerInfo.location); + } + const baseInstallFolder = getInstallFolder(); + const outputPath = import_path11.default.resolve(this.context.cwd, this.output ?? `corepack.tgz`); + if (!this.json) { + this.context.stdout.write(` +`); + this.context.stdout.write(`Packing the selected tools in ${import_path11.default.basename(outputPath)}... +`); + } + const { create: tarC } = await Promise.resolve().then(() => (init_create(), create_exports)); + await (0, import_promises3.mkdir)(baseInstallFolder, { recursive: true }); + await tarC({ gzip: true, cwd: baseInstallFolder, file: import_path11.default.resolve(outputPath) }, installLocations.map((location) => { + return import_path11.default.relative(baseInstallFolder, location); + })); + if (this.json) { + this.context.stdout.write(`${JSON.stringify(outputPath)} +`); + } else { + this.context.stdout.write(`All done! +`); + } + } +}; + +// sources/commands/Up.ts +var import_major = __toESM(require_major()); +var import_valid5 = __toESM(require_valid()); +var import_valid6 = __toESM(require_valid2()); +var UpCommand = class extends BaseCommand { + static paths = [ + [`up`] + ]; + static usage = Command.Usage({ + description: `Update the package manager used in the current project`, + details: ` + Retrieve the latest available version for the current major release line + of the package manager used in the local project, and update the project + to use it. + + Unlike \`corepack use\` this command doesn't take a package manager name + nor a version range, as it will always select the latest available + version from the same major line. Should you need to upgrade to a new + major, use an explicit \`corepack use '{name}@*'\` call. + `, + examples: [[ + `Configure the project to use the latest Yarn release`, + `corepack up` + ]] + }); + async execute() { + const [descriptor] = await this.resolvePatternsToDescriptors({ + patterns: [] + }); + if (!(0, import_valid5.default)(descriptor.range) && !(0, import_valid6.default)(descriptor.range)) + throw new UsageError(`The 'corepack up' command can only be used when your project's packageManager field is set to a semver version or semver range`); + const resolved = await this.context.engine.resolveDescriptor(descriptor, { useCache: false }); + if (!resolved) + throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); + const majorVersion = (0, import_major.default)(resolved.reference); + const majorDescriptor = { name: descriptor.name, range: `^${majorVersion}.0.0` }; + const highestVersion = await this.context.engine.resolveDescriptor(majorDescriptor, { useCache: false }); + if (!highestVersion) + throw new UsageError(`Failed to find the highest release for ${descriptor.name} ${majorVersion}.x`); + this.context.stdout.write(`Installing ${highestVersion.name}@${highestVersion.reference} in the project... +`); + const packageManagerInfo = await this.context.engine.ensurePackageManager(highestVersion); + await this.setAndInstallLocalPackageManager(packageManagerInfo); + } +}; + +// sources/commands/Use.ts +var UseCommand = class extends BaseCommand { + static paths = [ + [`use`] + ]; + static usage = Command.Usage({ + description: `Define the package manager to use for the current project`, + details: ` + When run, this command will retrieve the latest release matching the + provided descriptor, assign it to the project's package.json file, and + automatically perform an install. + `, + examples: [[ + `Configure the project to use the latest Yarn release`, + `corepack use yarn` + ]] + }); + pattern = options_exports.String(); + async execute() { + const [descriptor] = await this.resolvePatternsToDescriptors({ + patterns: [this.pattern] + }); + const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true, useCache: false }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); + this.context.stdout.write(`Installing ${resolved.name}@${resolved.reference} in the project... +`); + const packageManagerInfo = await this.context.engine.ensurePackageManager(resolved); + await this.setAndInstallLocalPackageManager(packageManagerInfo); + } +}; + +// sources/commands/deprecated/Hydrate.ts +var import_promises4 = require("fs/promises"); +var import_path12 = __toESM(require("path")); +var HydrateCommand = class extends Command { + static paths = [ + [`hydrate`] + ]; + activate = options_exports.Boolean(`--activate`, false, { + description: `If true, this release will become the default one for this package manager` + }); + fileName = options_exports.String(); + async execute() { + const installFolder = getInstallFolder(); + const fileName = import_path12.default.resolve(this.context.cwd, this.fileName); + const archiveEntries = /* @__PURE__ */ new Map(); + let hasShortEntries = false; + const { list: tarT } = await Promise.resolve().then(() => (init_list(), list_exports)); + await tarT({ file: fileName, onentry: (entry) => { + const segments = entry.path.split(/\//g); + if (segments.length < 3) { + hasShortEntries = true; + } else { + let references = archiveEntries.get(segments[0]); + if (typeof references === `undefined`) + archiveEntries.set(segments[0], references = /* @__PURE__ */ new Set()); + references.add(segments[1]); + } + } }); + if (hasShortEntries || archiveEntries.size < 1) + throw new UsageError(`Invalid archive format; did it get generated by 'corepack prepare'?`); + const { extract: tarX } = await Promise.resolve().then(() => (init_extract(), extract_exports)); + for (const [name2, references] of archiveEntries) { + for (const reference of references) { + if (!isSupportedPackageManager(name2)) + throw new UsageError(`Unsupported package manager '${name2}'`); + if (this.activate) + this.context.stdout.write(`Hydrating ${name2}@${reference} for immediate activation... +`); + else + this.context.stdout.write(`Hydrating ${name2}@${reference}... +`); + await (0, import_promises4.mkdir)(installFolder, { recursive: true }); + await tarX({ file: fileName, cwd: installFolder }, [`${name2}/${reference}`]); + if (this.activate) { + await this.context.engine.activatePackageManager({ name: name2, reference }); + } + } + } + this.context.stdout.write(`All done! +`); + } +}; + +// sources/commands/deprecated/Prepare.ts +var import_promises5 = require("fs/promises"); +var import_path13 = __toESM(require("path")); +var PrepareCommand = class extends Command { + static paths = [ + [`prepare`] + ]; + activate = options_exports.Boolean(`--activate`, false, { + description: `If true, this release will become the default one for this package manager` + }); + json = options_exports.Boolean(`--json`, false, { + description: `If true, the output will be the path of the generated tarball` + }); + output = options_exports.String(`-o,--output`, { + description: `If true, the installed package managers will also be stored in a tarball`, + tolerateBoolean: true + }); + specs = options_exports.Rest(); + async execute() { + const specs = this.specs; + const installLocations = []; + if (specs.length === 0) { + const lookup = await loadSpec(this.context.cwd); + switch (lookup.type) { + case `NoProject`: + throw new UsageError(`Couldn't find a project in the local directory - please specify the package manager to pack, or run this command from a valid project`); + case `NoSpec`: + throw new UsageError(`The local project doesn't feature a 'packageManager' field - please specify the package manager to pack, or update the manifest to reference it`); + default: { + specs.push(lookup.getSpec()); + } + } + } + for (const request of specs) { + const spec = typeof request === `string` ? parseSpec(request, `CLI arguments`, { enforceExactVersion: false }) : request; + const resolved = await this.context.engine.resolveDescriptor(spec, { allowTags: true }); + if (resolved === null) + throw new UsageError(`Failed to successfully resolve '${spec.range}' to a valid ${spec.name} release`); + if (!this.json) { + if (this.activate) { + this.context.stdout.write(`Preparing ${spec.name}@${spec.range} for immediate activation... +`); + } else { + this.context.stdout.write(`Preparing ${spec.name}@${spec.range}... +`); + } + } + const installSpec = await this.context.engine.ensurePackageManager(resolved); + installLocations.push(installSpec.location); + if (this.activate) { + await this.context.engine.activatePackageManager(resolved); + } + } + if (this.output) { + const outputName = typeof this.output === `string` ? this.output : `corepack.tgz`; + const baseInstallFolder = getInstallFolder(); + const outputPath = import_path13.default.resolve(this.context.cwd, outputName); + if (!this.json) + this.context.stdout.write(`Packing the selected tools in ${import_path13.default.basename(outputPath)}... +`); + const { create: tarC } = await Promise.resolve().then(() => (init_create(), create_exports)); + await (0, import_promises5.mkdir)(baseInstallFolder, { recursive: true }); + await tarC({ gzip: true, cwd: baseInstallFolder, file: import_path13.default.resolve(outputPath) }, installLocations.map((location) => { + return import_path13.default.relative(baseInstallFolder, location); + })); + if (this.json) { + this.context.stdout.write(`${JSON.stringify(outputPath)} +`); + } else { + this.context.stdout.write(`All done! +`); + } + } + } +}; + +// sources/main.ts +function getPackageManagerRequestFromCli(parameter, engine) { + if (!parameter) + return null; + const match = parameter.match(/^([^@]*)(?:@(.*))?$/); + if (!match) + return null; + const [, binaryName, binaryVersion] = match; + const packageManager = engine.getPackageManagerFor(binaryName); + if (packageManager == null && binaryVersion == null) return null; + return { + packageManager, + binaryName, + binaryVersion: binaryVersion || null + }; +} +function isUsageError(error) { + return error?.name === `UsageError`; +} +async function runMain(argv) { + const engine = new Engine(); + const [firstArg, ...restArgs] = argv; + const request = getPackageManagerRequestFromCli(firstArg, engine); + if (!request) { + const cli = new Cli({ + binaryLabel: `Corepack`, + binaryName: `corepack`, + binaryVersion: version + }); + cli.register(builtins_exports.HelpCommand); + cli.register(builtins_exports.VersionCommand); + cli.register(CacheCommand); + cli.register(DisableCommand); + cli.register(EnableCommand); + cli.register(InstallGlobalCommand); + cli.register(InstallLocalCommand); + cli.register(PackCommand); + cli.register(UpCommand); + cli.register(UseCommand); + cli.register(HydrateCommand); + cli.register(PrepareCommand); + const context = { + ...Cli.defaultContext, + cwd: process.cwd(), + engine + }; + const code2 = await cli.run(argv, context); + if (code2 !== 0) { + process.exitCode ??= code2; + } + } else { + try { + await engine.executePackageManagerRequest(request, { + cwd: process.cwd(), + args: restArgs + }); + } catch (error) { + if (isUsageError(error)) { + console.error(error.message); + process.exit(1); + } + throw error; + } + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + runMain +}); +/*! Bundled license information: + +undici/lib/web/fetch/body.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) + +is-windows/index.js: + (*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + *) +*/ diff --git a/node_modules/corepack/dist/npm.js b/node_modules/corepack/dist/npm.js new file mode 100755 index 0000000000..75f68b058f --- /dev/null +++ b/node_modules/corepack/dist/npm.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(['npm', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/npx.js b/node_modules/corepack/dist/npx.js new file mode 100755 index 0000000000..b1138bb48e --- /dev/null +++ b/node_modules/corepack/dist/npx.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(['npx', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/pnpm.js b/node_modules/corepack/dist/pnpm.js new file mode 100755 index 0000000000..56ba509405 --- /dev/null +++ b/node_modules/corepack/dist/pnpm.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(['pnpm', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/pnpx.js b/node_modules/corepack/dist/pnpx.js new file mode 100755 index 0000000000..ee36be2e99 --- /dev/null +++ b/node_modules/corepack/dist/pnpx.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(['pnpx', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/yarn.js b/node_modules/corepack/dist/yarn.js new file mode 100755 index 0000000000..ce628c82b6 --- /dev/null +++ b/node_modules/corepack/dist/yarn.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(['yarn', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/yarnpkg.js b/node_modules/corepack/dist/yarnpkg.js new file mode 100755 index 0000000000..9541ed726a --- /dev/null +++ b/node_modules/corepack/dist/yarnpkg.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' +require('module').enableCompileCache?.(); +require('./lib/corepack.cjs').runMain(['yarnpkg', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/package.json b/node_modules/corepack/package.json new file mode 100644 index 0000000000..704128ccd4 --- /dev/null +++ b/node_modules/corepack/package.json @@ -0,0 +1,102 @@ +{ + "name": "corepack", + "version": "0.34.5", + "homepage": "https://github.com/nodejs/corepack#readme", + "bugs": { + "url": "https://github.com/nodejs/corepack/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/nodejs/corepack.git" + }, + "engines": { + "node": "^20.10.0 || ^22.11.0 || >=24.0.0" + }, + "exports": { + "./package.json": "./package.json" + }, + "license": "MIT", + "packageManager": "yarn@4.11.0+sha224.209a3e277c6bbc03df6e4206fbfcb0c1621c27ecf0688f79a0c619f0", + "devDependencies": { + "@types/debug": "^4.1.5", + "@types/node": "^20.4.6", + "@types/proxy-from-env": "^1", + "@types/semver": "^7.1.0", + "@types/which": "^3.0.0", + "@yarnpkg/eslint-config": "^3.0.0", + "@yarnpkg/fslib": "^3.0.0-rc.48", + "@zkochan/cmd-shim": "^6.0.0", + "better-sqlite3": "^11.7.2", + "clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch", + "debug": "^4.1.1", + "esbuild": "^0.25.0", + "eslint": "^9.22.0", + "proxy-from-env": "^1.1.0", + "semver": "^7.6.3", + "supports-color": "^10.0.0", + "tar": "^7.4.0", + "tsx": "^4.16.2", + "typescript": "^5.7.3", + "undici": "^6.21.2", + "v8-compile-cache": "^2.3.0", + "vitest": "^3.0.5", + "which": "^5.0.0" + }, + "resolutions": { + "undici-types": "6.x" + }, + "scripts": { + "build": "run clean && run build:bundle && tsx ./mkshims.ts", + "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", + "clean": "run rimraf dist shims", + "corepack": "tsx ./sources/_cli.ts", + "lint": "eslint .", + "prepack": "yarn build", + "postpack": "run clean", + "rimraf": "node -e 'for(let i=2;i=24.0.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000000..462180ff17 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "corepack": "^0.34.5" + } +} diff --git a/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts index 49651d7267..50e27f6783 100644 --- a/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts +++ b/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts @@ -5,6 +5,7 @@ import { ReflowableDecorationsBridge } from "./all-decoration-bridge" import { ReflowableListenerAdapter } from "./all-listener-bridge" import { ReflowableSelectionBridge } from "./all-selection-bridge" import { CssBridge } from "./reflowable-css-bridge" +import { ReflowableMoveBridge } from "./reflowable-move-bridge" export class ReflowableInitializationBridge { private readonly window: Window @@ -20,6 +21,9 @@ export class ReflowableInitializationBridge { } private initApis() { + this.window.move = new ReflowableMoveBridge(this.window.document) + this.listener.onMoveApiAvailable() + const bridgeListener = new ReflowableListenerAdapter(window.gestures) const decorationManager = new DecorationManager(window) @@ -58,6 +62,7 @@ export class ReflowableInitializationBridge { export interface ReflowableApiStateListener { onCssApiAvailable(): void + onMoveApiAvailable(): void onSelectionApiAvailable(): void onDecorationApiAvailable(): void } diff --git a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts new file mode 100644 index 0000000000..79dc1cf916 --- /dev/null +++ b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts @@ -0,0 +1,43 @@ +export class ReflowableMoveBridge { + readonly document: HTMLDocument + + constructor(document: HTMLDocument) { + this.document = document + } + + getOffsetForLocation(location: string, vertical: boolean): number | null { + const actualLocation = parseLocation(location) + + if (actualLocation.htmlId) { + return this.getOffsetForHtmlId(actualLocation.htmlId, vertical) + } + + return null + } + + private getOffsetForHtmlId(htmlId: string, vertical: boolean): number | null { + const element = this.document.getElementById(htmlId) + if (!element) { + return null + } + + const rect = element.getBoundingClientRect() + + if (vertical) { + return rect.top + window.scrollY + } else { + const offset = rect.left + window.scrollX + return offset + } + } +} + +interface Location { + progression: number + htmlId: string +} + +function parseLocation(location: string): Location { + const jsonLocation: Location = JSON.parse(location) + return jsonLocation +} diff --git a/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts b/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts index 048a395ef2..23303e6612 100644 --- a/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts +++ b/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts @@ -13,6 +13,7 @@ import { GesturesBridge } from "./bridge/all-listener-bridge" import { DocumentStateBridge } from "./bridge/all-listener-bridge" import { ReflowableSelectionBridge } from "./bridge/all-selection-bridge" import { CssBridge } from "./bridge/reflowable-css-bridge" +import { ReflowableMoveBridge } from "./bridge/reflowable-move-bridge" import { ReflowableApiStateListener, ReflowableInitializationBridge as ReflowableInitializer, @@ -26,6 +27,7 @@ declare global { readiumcss: CssBridge decorations: ReflowableDecorationsBridge selection: ReflowableSelectionBridge + move: ReflowableMoveBridge // Native APIs available for web code documentState: DocumentStateBridge gestures: GesturesBridge diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index 7552088083..518935823b 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],c=o>>>31,s=e[r]|c,u=s|a,l=(s&i)+i^i|s,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=c)|~(u|(f|=n(o)-c)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,c={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};c.lastRowMask.fill(1<<31),c.lastRowMask[a]=1<<(e.length-1)%i;for(var s=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(s);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(a,i),s=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=c(n,a,arguments);return s&&u&&s(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return c(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),c=o("%TypeError%"),s=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new c("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new c("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!s&&s(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,c=r(6663),s=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;s?c(t,e,r,!0):c(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var c=0;c2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),c=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):c(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var s=e.call(t,r);if(o(s))return s;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||c(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,c="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),c=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=s(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[c]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),c={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!c.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(c),t.exports=c},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},c=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},s=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;s.call(p)===s.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=s.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&c(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return c(t);if(a(t))return!1;var e=s.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&c(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,c=r(3099),s=r(3060)();if(s){n=c("Object.prototype.hasOwnProperty"),o=c("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=c("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=s?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=c&&s&&"function"==typeof s.get?s.get:null,l=c&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var c=r||{};if(V(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!V(c,"customInspect")||c.customInspect;if("boolean"!=typeof s&&"symbol"!==s)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return z(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===c.depth?5:c.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(c,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:c.depth};return V(c,"quoteStyle")&&(a.quoteStyle=c.quoteStyle),t(e,a,n+1,o)}return t(e,c,n+1,o)}if("function"==typeof e&&!U(e)){var X=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(X?": "+X:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&s){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==s&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return a&&a.call(e,(function(t,r){ct.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),ct,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l&&l.call(e,(function(t){st.push(G(t,e))})),Y("Set",u.call(e),st,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),c=r(7299),s=o(a());n(s,{getPolyfill:a,implementation:i,shim:c}),t.exports=s},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,c=TypeError,s=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!s)throw new c("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=s(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),c=o("%TypeError%");t.exports=function(t){if(!i(t))throw new c("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),c=n("%WeakMap%",!0),s=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(c&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(s){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(c&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(s){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){c&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new c),l(t,n,o)):s?(e||(e=new s),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),c=r(5128),s=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=s(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(s(r),p(c(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=c(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),c=r(3911),s=n(i);o(s,{getPolyfill:a,implementation:i,shim:c}),t.exports=s},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),c=r(3995),s=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=s(t),f=function(t,e){var r="flags"in e?o(e,"flags"):s(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=c(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),c=Object.defineProperty,s=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),c&&s){var r=s(Symbol,e);r&&!r.configurable||c(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),c=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,c,""),s,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),c=r(3228),s=r(818),u=n(c()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:c,implementation:a,shim:s}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),c=r(5674),s=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new s("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>c)throw new s("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new s("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),c=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return c(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),c=r(1874),s=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==c(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":s(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),c=r(6284),s=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,s,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),c=r(1510),s=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return s(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),s(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=c(r,u,o);y(e,"lastIndex",f,!0)}return s(a,!1)}return m.set(t,"[[Done]]",!0),s(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),c=r(8355),s=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:s,IsAccessorDescriptor:c},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:s,IsAccessorDescriptor:c},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(s,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),c=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(c(e)+" is not a function: "+c(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),c=r(6287),s=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==s(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!c(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),c=r(7304),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==s(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(c(r)){var u=i(r,t,[e]);if(null===u||"Object"===s(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),c=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,s){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(s))throw new n("Assertion failed: `Throw` must be a Boolean");if(s){if(t[e]=r,c&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!c||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==c(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),c=n("%parseInt%"),s=r(3099),u=r(7582),l=s("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(c(l(e,2),2));if(p(e))return o(c(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),c=r(703),s=r(6207);t.exports=function(t){var e=a(t)?t:c(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?s(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),c=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!c(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var s=t.set;if(void 0!==s&&!c(s))throw new o("setter must be a function");e["[[Set]]"]=s}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),c=r(959);t.exports=function(t,e){if(!a(t)||!c(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),c=a&&r(2403),s=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&s(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&c(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),c=r(2990),s={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&s["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&c(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=s[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&s(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==s&&t!==u)),i=c(s,u);return o.push(i),a(o,r,n)}}return t}function c(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function s(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(c,n),l(c)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const c=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)c();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),c=0;for(;void 0!==r&&a;)i=a,c+i.data.length>r?(o.push({node:i,offset:r-c}),r=e.shift()):(a=n.nextNode(),c+=i.data.length);for(;void 0!==r&&i&&c===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let c=1;return"number"==typeof r.hint&&(c=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*c)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,s="vertical-rl"===c||"vertical-lr"===c,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=s?window.innerHeight:window.innerWidth,h=s?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(s?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!c.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,s=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of s){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,c),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,m(t,b,b,c),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;const e=this.window.getSelection();if(e&&"Range"==e.type)return;let r,n;if(r=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,r){if(!(r instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(r.href,r.outerHTML),t.stopPropagation(),t.preventDefault()}n=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,n?this.listener.onDecorationActivated(n):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,c=i.end.offset;let s=o.slice(Math.max(0,a-200),a);const u=s.search(/\P{L}\p{L}/gu);-1!==u&&(s=s.slice(u+1));let l=o.slice(c,Math.min(o.length,c+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:s,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class ${constructor(t){this.gesturesBridge=t}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}}class D{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class F{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,c=1===e||0===a?0:e-a;if(c>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;const e=this.window.getSelection();if(e&&"Range"==e.type)return;let r,n;if(r=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,r){if(!(r instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(r.href,r.outerHTML),t.stopPropagation(),t.preventDefault()}n=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,n?this.listener.onDecorationActivated(n):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class ${constructor(t){this.gesturesBridge=t}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}}class D{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class F{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class k{constructor(t){this.document=t}getOffsetForLocation(t,e){const r=function(t){return JSON.parse(t)}(t);return r.htmlId?this.getOffsetForHtmlId(r.htmlId,e):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);if(!r)return null;const n=r.getBoundingClientRect();return e?n.top+window.scrollY:n.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index 26726113ad..7d04e83bd2 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GAAK,EAEvCxB,EAAM,CACNK,EAAG,IAAIsB,YAAYF,EAAO,GAC1BlB,EAAG,IAAIoB,YAAYF,EAAO,GAC1BV,YAAa,IAAIY,YAAYF,EAAO,IAExCzB,EAAIe,YAAYa,KAAK,GAAK,IAC1B5B,EAAIe,YAAYU,GAAQ,IAAMP,EAAQE,OAAS,GAAKI,EAUpD,IARA,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AiB,IAAI5C,EAA0B3gB,OAAOwjB,UACtDhG,EAAoB,IAAI7G,EAAkB3W,QAChD7S,KAAK6S,OAAOyjB,WAAa,IAAIjC,EAAUxhB,OAAOrK,UAC9CxI,KAAKowB,SAASmG,oBACdv2B,KAAK6S,OAAO2d,UAAY,IAAI4D,EAA0BvhB,OAAQ,IAAIye,EAAiBze,SACnF7S,KAAKowB,SAASoG,0BACdx2B,KAAK6S,OAAO4jB,YAAc,IAAIxD,EAA4BpgB,OAAQwd,GAClErwB,KAAKowB,SAASsG,2BACd,IAAIvG,EAAiBtd,OAAQujB,EAAgB/F,EACjD,CAEA,aAAA6F,GACIl2B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAM+M,EAAOnuB,SAASmiB,cAAc,QACpCgM,EAAKhB,aAAa,OAAQ,YAC1BgB,EAAKhB,aAAa,UAAW,gGAC7B31B,KAAK6S,OAAOrK,SAASouB,KAAK9L,YAAY6L,EAAK,GAEnD,GFQsB9jB,OAAQA,OAAOgkB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n const selection = this.window.getSelection();\n if (selection && selection.type == \"Range\") {\n // There's an on-going selection, the tap will dismiss it so we don't forward it.\n // selection.type might be None (collapsed) or Caret with a collapsed range\n // when there is not true selection.\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge) {\n this.gesturesBridge = gesturesBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n const bridgeListener = new ReflowableListenerAdapter(window.gestures);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","selection","getSelection","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionManager","isSelecting","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","bridgeListener","gestures","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EA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,EAAqB10B,KAAK6S,OAAOrK,UACxDxI,KAAKowB,SAAS4G,qBACd,MAAMC,EAAiB,IAAIzD,EAA0B3gB,OAAOqkB,UACtD7G,EAAoB,IAAI7G,EAAkB3W,QAChD7S,KAAK6S,OAAOskB,WAAa,IAAI9C,EAAUxhB,OAAOrK,UAC9CxI,KAAKowB,SAASgH,oBACdp3B,KAAK6S,OAAO2d,UAAY,IAAI4D,EAA0BvhB,OAAQ,IAAIye,EAAiBze,SACnF7S,KAAKowB,SAASiH,0BACdr3B,KAAK6S,OAAOykB,YAAc,IAAIrE,EAA4BpgB,OAAQwd,GAClErwB,KAAKowB,SAASmH,2BACd,IAAIpH,EAAiBtd,OAAQokB,EAAgB5G,EACjD,CAEA,aAAAwG,GACI72B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAM4N,EAAOhvB,SAASmiB,cAAc,QACpC6M,EAAKlB,aAAa,OAAQ,YAC1BkB,EAAKlB,aAAa,UAAW,gGAC7Bt2B,KAAK6S,OAAOrK,SAASivB,KAAK3M,YAAY0M,EAAK,GAEnD,GFKsB3kB,OAAQA,OAAO6kB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n const selection = this.window.getSelection();\n if (selection && selection.type == \"Range\") {\n // There's an on-going selection, the tap will dismiss it so we don't forward it.\n // selection.type might be None (collapsed) or Caret with a collapsed range\n // when there is not true selection.\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge) {\n this.gesturesBridge = gesturesBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","export class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n const actualLocation = parseLocation(location);\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n const rect = element.getBoundingClientRect();\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","selection","getSelection","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionManager","isSelecting","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","htmlId","getOffsetForHtmlId","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableApiState.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableApiState.kt index 82793a9913..1c47ba2914 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableApiState.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableApiState.kt @@ -16,6 +16,7 @@ public class DelegatingReflowableApiStateListener( private val onCssApiAvailableDelegate: () -> Unit, private val onSelectionApiAvailableDelegate: () -> Unit, private val onDecorationApiAvailableDelegate: () -> Unit, + private val onMoveApiAvailableDelegate: () -> Unit, ) : ReflowableApiStateListener { override fun onCssApiAvailable() { @@ -29,6 +30,10 @@ public class DelegatingReflowableApiStateListener( override fun onDecorationApiAvailable() { this.onDecorationApiAvailableDelegate() } + + override fun onMoveApiAvailable() { + this.onMoveApiAvailableDelegate() + } } public interface ReflowableApiStateListener { @@ -38,6 +43,8 @@ public interface ReflowableApiStateListener { public fun onSelectionApiAvailable() public fun onDecorationApiAvailable() + + public fun onMoveApiAvailable() } public class ReflowableApiStateApi( @@ -72,4 +79,11 @@ public class ReflowableApiStateApi( listener.onDecorationApiAvailable() } } + + @android.webkit.JavascriptInterface + public fun onMoveApiAvailable() { + coroutineScope.launch { + listener.onMoveApiAvailable() + } + } } diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt new file mode 100644 index 0000000000..e569d93b58 --- /dev/null +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Readium Foundation. All rights reserved. + * Use of this source code is governed by the BSD-style license + * available in the top-level LICENSE file of the project. + */ + +@file:OptIn(ExperimentalReadiumApi::class) + +package org.readium.navigator.web.internals.webapi + +import android.webkit.WebView +import androidx.compose.foundation.gestures.Orientation +import kotlin.math.roundToInt +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json +import org.readium.navigator.common.HtmlId +import org.readium.navigator.common.Progression +import org.readium.navigator.web.internals.webview.evaluateJavaScriptSuspend +import org.readium.r2.shared.ExperimentalReadiumApi + +public class ReflowableMoveApi( + private val webView: WebView, +) { + + public suspend fun getOffsetForLocation( + progression: Progression? = null, + htmlId: HtmlId? = null, + orientation: Orientation, + ): Int? = + withContext(Dispatchers.Main) { + getOffsetForLocationUnsafe(progression, htmlId, orientation) + } + + private suspend fun getOffsetForLocationUnsafe( + progression: Progression?, + htmlId: HtmlId?, + orientation: Orientation, + ): Int? { + val jsonLocation = JsonLocation(progression?.value, htmlId?.value) + val locationAsLiteral = Json.encodeToString(jsonLocation).toJavaScriptLiteral() + val vertical = orientation == Orientation.Vertical + val script = "move.getOffsetForLocation($locationAsLiteral, $vertical)" + val result = webView.evaluateJavaScriptSuspend(script) + return result.toDoubleOrNull()?.roundToInt() + } +} + +@Serializable +private data class JsonLocation( + val progression: Double?, + val htmlId: String?, +) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index 7486347975..de265d85b4 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -112,19 +112,37 @@ public class WebViewScrollController( direction = direction ) if (snap) { - when (orientation) { - Orientation.Vertical -> { - val offset = webView.scrollY % webView.height - webView.scrollBy(0, -offset) - } - Orientation.Horizontal -> { - val offset = webView.scrollX % webView.width - webView.scrollBy(-offset, 0) - } + snap(orientation) + } + } + + public fun snap(orientation: Orientation) { + when (orientation) { + Orientation.Vertical -> { + val offset = webView.scrollY % webView.height + webView.scrollBy(0, -offset) + } + Orientation.Horizontal -> { + val offset = webView.scrollX % webView.width + webView.scrollBy(-offset, 0) } } } + public fun moveToOffset( + offset: Int, + snap: Boolean, + orientation: Orientation, + ) { + webView.scrollToOffset( + offset = offset, + orientation = orientation + ) + if (snap) { + snap(orientation) + } + } + public fun moveForward(orientation: Orientation, direction: LayoutDirection): Unit = when (orientation) { Orientation.Vertical -> moveBottom() @@ -182,6 +200,20 @@ private fun RelaxedWebView.scrollToProgression( } } +private fun RelaxedWebView.scrollToOffset( + offset: Int, + orientation: Orientation, +) { + when (orientation) { + Orientation.Vertical -> { + scrollTo(scrollX, offset) + } + Orientation.Horizontal -> { + scrollTo(offset, scrollY) + } + } +} + private fun RelaxedWebView.progression( orientation: Orientation, direction: LayoutDirection, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index 3594ebb98b..a2d3331d54 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -166,11 +166,16 @@ public fun ReflowableWebRendition( val href = state.publication.readingOrder.items[index].href val decorations = state.decorationDelegate.decorations - .mapValues { it.value.filter { it.location.href == href } } + .mapValues { groupDecorations -> groupDecorations.value.filter { it.location.href == href } } .toImmutableMap() + val pendingLocation = state.navigationDelegate.pendingGo.value + ?.location + ?.takeIf { it.href == href } + ReflowableResource( resourceState = state.resourceStates[index], + pendingLocation = pendingLocation, publicationBaseUrl = WebViewServer.publicationBaseHref, webViewClient = state.webViewClient, backgroundColor = backgroundColor, @@ -212,6 +217,9 @@ public fun ReflowableWebRendition( }, onDocumentResized = { state.scrollState.onDocumentResized(index) + }, + onPendingLocationConsumed = { consumedLocation -> + state.navigationDelegate.consumePendingGo(consumedLocation) } ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 89b22799a4..bb90d43061 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -22,10 +22,18 @@ import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import kotlin.coroutines.Continuation +import kotlin.coroutines.resume +import kotlin.coroutines.suspendCoroutine import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentMapOf +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.MainScope +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import org.readium.navigator.common.DecorationController import org.readium.navigator.common.HtmlId import org.readium.navigator.common.NavigationController @@ -178,7 +186,7 @@ public class ReflowableWebRenditionState internal constructor( WebViewClient(webViewServer) } - private lateinit var navigationDelegate: ReflowableNavigationDelegate + internal lateinit var navigationDelegate: ReflowableNavigationDelegate internal fun initController(location: ReflowableWebLocation) { navigationDelegate = @@ -207,7 +215,7 @@ public class ReflowableWebRenditionState internal constructor( @ExperimentalReadiumApi @Stable public class ReflowableWebRenditionController internal constructor( - navigationDelegate: ReflowableNavigationDelegate, + internal val navigationDelegate: ReflowableNavigationDelegate, layoutDelegate: ReflowableLayoutDelegate, decorationDelegate: ReflowableDecorationDelegate, selectionDelegate: ReflowableSelectionDelegate, @@ -285,15 +293,32 @@ internal class ReflowableNavigationDelegate( initialLocation: ReflowableWebLocation, ) : NavigationController, OverflowController { + private val coroutineScope: CoroutineScope = + MainScope() + private val locationMutable: MutableState = mutableStateOf(initialLocation) + internal val pendingGo: MutableState = + mutableStateOf(null) + internal fun updateLocation(location: ReflowableWebLocation) { val index = checkNotNull(readingOrder.indexOfHref(location.href)) resourceStates[index].progression = location.progression locationMutable.value = location } + internal fun consumePendingGo(location: ReflowableWebGoLocation) { + coroutineScope.launch { + pendingGo.value?.let { pendingGoNow -> + if (pendingGoNow.location == location) { + pendingGo.value = null + pendingGoNow.continuation.resume(Unit) + } + } + } + } + override val overflow: Overflow by overflowState override val location: ReflowableWebLocation by locationMutable @@ -306,21 +331,24 @@ internal class ReflowableNavigationDelegate( goTo(location) } - override suspend fun goTo(location: ReflowableWebGoLocation) { - val resourceIndex = readingOrder.indexOfHref(location.href) ?: return - pagerState.scrollToPage(resourceIndex) - location.progression?.let { // FIXME: goTo returns before the move has completed. - resourceStates[resourceIndex].progression = it - // If the scrollController is not available yet, progression will be applied - // when it becomes available. - resourceStates[resourceIndex].scrollController.value?.moveToProgression(it) - } - } - override suspend fun goTo(location: ReflowableWebLocation) { goTo(ReflowableWebGoLocation(location.href, location.progression)) } + override suspend fun goTo(location: ReflowableWebGoLocation) { + withContext(Dispatchers.Main) { + pendingGo.value?.continuation?.resume(Unit) + pendingGo.value = null + + val resourceIndex = readingOrder.indexOfHref(location.href) ?: return@withContext + pagerState.scrollToPage(resourceIndex) + + suspendCoroutine { continuation -> + pendingGo.value = ReflowablePendingGo(location, continuation) + } + } + } + // This information is not available when the WebView has not yet been composed or laid out. // We assume that the best UI behavior would be to have a possible forward button disabled // and return false when we can't tell. @@ -391,6 +419,11 @@ internal class ReflowableNavigationDelegate( } } +internal data class ReflowablePendingGo( + val location: ReflowableWebGoLocation, + val continuation: Continuation, +) + internal class ReflowableDecorationDelegate( val decorationTemplates: WebDecorationTemplates, ) : DecorationController { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 0413bcf726..4a4953c865 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -26,8 +26,10 @@ import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.LayoutDirection +import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import kotlinx.collections.immutable.ImmutableMap import kotlinx.coroutines.flow.launchIn @@ -54,6 +56,7 @@ import org.readium.navigator.web.internals.webapi.GesturesApi import org.readium.navigator.web.internals.webapi.ReadiumCssApi import org.readium.navigator.web.internals.webapi.ReflowableApiStateApi import org.readium.navigator.web.internals.webapi.ReflowableDecorationApi +import org.readium.navigator.web.internals.webapi.ReflowableMoveApi import org.readium.navigator.web.internals.webapi.ReflowableSelectionApi import org.readium.navigator.web.internals.webview.RelaxedWebView import org.readium.navigator.web.internals.webview.WebView @@ -63,6 +66,7 @@ import org.readium.navigator.web.reflowable.ReflowableWebDecoration import org.readium.navigator.web.reflowable.ReflowableWebDecorationCssSelectorLocation import org.readium.navigator.web.reflowable.ReflowableWebDecorationLocation import org.readium.navigator.web.reflowable.ReflowableWebDecorationTextQuoteLocation +import org.readium.navigator.web.reflowable.ReflowableWebGoLocation import org.readium.navigator.web.reflowable.css.ReadiumCssInjector import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.AbsoluteUrl @@ -73,6 +77,7 @@ import timber.log.Timber @Composable internal fun ReflowableResource( resourceState: ReflowableResourceState, + pendingLocation: ReflowableWebGoLocation?, publicationBaseUrl: AbsoluteUrl, webViewClient: WebViewClient, backgroundColor: Color, @@ -90,6 +95,7 @@ internal fun ReflowableResource( onDecorationActivated: (DecorationListener.OnActivatedEvent) -> Unit, onProgressionChange: (Progression) -> Unit, onDocumentResized: () -> Unit, + onPendingLocationConsumed: (ReflowableWebGoLocation) -> Unit, ) { Box( modifier = Modifier.fillMaxSize(), @@ -126,6 +132,10 @@ internal fun ReflowableResource( mutableStateOf(null) } + var moveApi by remember(webViewState.webView) { + mutableStateOf(null) + } + val decorations = remember(webViewState.webView) { mutableStateOf(decorations) } .apply { value = decorations } @@ -148,6 +158,9 @@ internal fun ReflowableResource( }, onDecorationApiAvailableDelegate = { decorationApi = ReflowableDecorationApi(webView, decorationTemplates) + }, + onMoveApiAvailableDelegate = { + moveApi = ReflowableMoveApi(webView) } ) ReflowableApiStateApi(webView, listener) @@ -196,6 +209,29 @@ internal fun ReflowableResource( } } + val density = LocalDensity.current + + LaunchedEffect(moveApi, pendingLocation, resourceState.scrollController.value) { + moveApi?.let { moveApi -> + pendingLocation?.let { + resourceState.scrollController.value?.let { scrollController -> + moveApi.getOffsetForLocation( + progression = pendingLocation.progression, + htmlId = pendingLocation.htmlId, + orientation = orientation + )?.let { offset -> + scrollController.moveToOffset( + offset = with(density) { offset.dp.roundToPx() }, + snap = !scroll, + orientation = orientation, + ) + } + onPendingLocationConsumed(pendingLocation) + } + } + } + } + LaunchedEffect(gesturesApi, onTap, onLinkActivated, padding) { gesturesApi?.let { gesturesApi -> gesturesApi.listener = DelegatingGesturesListener( diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt index 4ded8af3d7..d800dcbbd0 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt @@ -4,6 +4,8 @@ * available in the top-level LICENSE file of the project. */ +@file:OptIn(ExperimentalReadiumApi::class) + package org.readium.navigator.web.reflowable.resource import androidx.compose.runtime.MutableState @@ -15,7 +17,6 @@ import org.readium.navigator.web.internals.webview.WebViewScrollController import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.Url -@OptIn(ExperimentalReadiumApi::class) @Stable internal class ReflowableResourceState( val index: Int, From 1497d473bbc9e5cf062b761780863f2518684c97 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 27 Nov 2025 09:58:20 +0100 Subject: [PATCH 05/56] Implement positions and total progression --- .../navigator/common/LocationElements.kt | 4 +-- .../web/fixedlayout/FixedWebLocations.kt | 13 +++++++-- .../web/fixedlayout/FixedWebRendition.kt | 8 ++++-- .../web/reflowable/ReflowableWebLocations.kt | 12 +++++++-- .../reflowable/ReflowableWebPublication.kt | 27 +++++++++++++++++++ .../web/reflowable/ReflowableWebRendition.kt | 17 ++++++------ .../ReflowableWebRenditionFactory.kt | 19 +++++++++---- 7 files changed, 78 insertions(+), 22 deletions(-) diff --git a/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt b/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt index 3c2ae8d09a..b8a3d66b49 100644 --- a/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt +++ b/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt @@ -53,8 +53,8 @@ public value class Position private constructor( ) { public companion object { - public operator fun invoke(value: Double): Position? = - value.takeIf { value >= 0 } + public operator fun invoke(value: Int): Position? = + value.takeIf { value >= 1 } ?.let { Position(it) } } } diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt index 34f7f1d2c2..7e78f4b1a7 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt @@ -15,6 +15,9 @@ import org.readium.navigator.common.DecorationLocation import org.readium.navigator.common.ExportableLocation import org.readium.navigator.common.GoLocation import org.readium.navigator.common.Location +import org.readium.navigator.common.Position +import org.readium.navigator.common.PositionLocation +import org.readium.navigator.common.Progression import org.readium.navigator.common.SelectionLocation import org.readium.navigator.common.TextQuote import org.readium.navigator.common.TextQuoteLocation @@ -100,13 +103,19 @@ internal data class FixedWebDecorationTextQuoteLocation( @ConsistentCopyVisibility public data class FixedWebLocation internal constructor( override val href: Url, + override val position: Position, + val totalProgression: Progression, private val mediaType: MediaType?, -) : ExportableLocation { +) : ExportableLocation, PositionLocation { override fun toLocator(): Locator = Locator( href = href, - mediaType = mediaType ?: MediaType.XHTML + mediaType = mediaType ?: MediaType.XHTML, + locations = Locator.Locations( + position = position.value, + totalProgression = totalProgression.value + ) ) } diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index be3842e71e..c623093b6c 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -34,6 +34,8 @@ import kotlinx.coroutines.launch import org.readium.navigator.common.DecorationListener import org.readium.navigator.common.HyperlinkListener import org.readium.navigator.common.InputListener +import org.readium.navigator.common.Position +import org.readium.navigator.common.Progression import org.readium.navigator.common.TapContext import org.readium.navigator.common.defaultDecorationListener import org.readium.navigator.common.defaultHyperlinkListener @@ -100,8 +102,10 @@ public fun FixedWebRendition( val itemIndex = state.layoutDelegate.layout.value.pageIndexForSpread(spreadIndex) val href = state.publication.readingOrder[itemIndex].href val mediaType = state.publication.readingOrder[itemIndex].mediaType + val position = Position(itemIndex + 1)!! + val totalProgression = Progression(spreadIndex / state.layoutDelegate.layout.value.spreads.size.toDouble())!! - return FixedWebLocation(href, mediaType) + return FixedWebLocation(href, position, totalProgression, mediaType) } if (state.controller == null) { @@ -197,7 +201,7 @@ public fun FixedWebRendition( val spread = state.layoutDelegate.layout.value.spreads[index] val decorations = state.decorationDelegate.decorations - .mapValues { it.value.filter { it.location.href in spread.pages.map { it.href } } } + .mapValues { groupDecorations -> groupDecorations.value.filter { it.location.href in spread.pages.map { it.href } } } .toImmutableMap() when (spread) { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt index f087adba1a..a5e4e0d1cb 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt @@ -16,6 +16,8 @@ import org.readium.navigator.common.ExportableLocation import org.readium.navigator.common.GoLocation import org.readium.navigator.common.HtmlId import org.readium.navigator.common.Location +import org.readium.navigator.common.Position +import org.readium.navigator.common.PositionLocation import org.readium.navigator.common.Progression import org.readium.navigator.common.ProgressionLocation import org.readium.navigator.common.SelectionLocation @@ -127,13 +129,19 @@ public data class ReflowableWebLocation internal constructor( override val href: Url, private val mediaType: MediaType?, override val progression: Progression, -) : ExportableLocation, ProgressionLocation { + override val position: Position, + val totalProgression: Progression, +) : ExportableLocation, ProgressionLocation, PositionLocation { override fun toLocator(): Locator = Locator( href = href, mediaType = mediaType ?: MediaType.XHTML, - locations = Locations(progression = progression.value) + locations = Locations( + progression = progression.value, + position = position.value, + totalProgression = totalProgression.value + ) ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt index 06e9486c6a..aae3e2c14e 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt @@ -4,8 +4,14 @@ * available in the top-level LICENSE file of the project. */ +@file:OptIn(ExperimentalReadiumApi::class) + package org.readium.navigator.web.reflowable +import kotlin.math.floor +import org.readium.navigator.common.Position +import org.readium.navigator.common.Progression +import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.Url import org.readium.r2.shared.util.data.Container import org.readium.r2.shared.util.mediatype.MediaType @@ -23,6 +29,7 @@ internal class ReflowableWebPublication( data class ReadingOrder( val items: List, + val positionNumbers: List, ) { val size: Int get() = items.size @@ -36,10 +43,30 @@ internal class ReflowableWebPublication( private val allItems = readingOrder.items + otherResources + private val startPositions = buildList { + var position = 1 + for (item in readingOrder.positionNumbers) { + add(position) + position += item + } + } + + private val totalPositionCount = readingOrder.positionNumbers.sum() + val mediaTypes = allItems .mapNotNull { item -> item.mediaType?.let { item.href to it } } .associate { it } fun itemWithHref(href: Url): Item? = allItems.firstOrNull { it.href == href } + + fun positionForProgression(index: Int, progression: Progression): Position { + val itemPositionNumber = readingOrder.positionNumbers[index] + val localPosition = floor(progression.value * itemPositionNumber).toInt() + return Position(startPositions[index] + localPosition)!! + } + + fun totalProgressionForPosition(position: Position): Progression { + return Progression(position.value / totalPositionCount.toDouble())!! + } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index a2d3331d54..ef7166a8c3 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -125,11 +125,16 @@ public fun ReflowableWebRendition( val currentPageState = remember(state) { derivedStateOf { state.pagerState.currentPage } } fun currentLocation(): ReflowableWebLocation { - val currentItem = state.publication.readingOrder.items[currentPageState.value] + val currentIndex = currentPageState.value + val currentItem = state.publication.readingOrder.items[currentIndex] + val progression = state.resourceStates[currentPageState.value].progression + val position = state.publication.positionForProgression(currentIndex, progression) return ReflowableWebLocation( href = currentItem.href, mediaType = currentItem.mediaType, - progression = state.resourceStates[currentPageState.value].progression + progression = progression, + position = position, + totalProgression = state.publication.totalProgressionForPosition(position) ) } @@ -206,13 +211,7 @@ public fun ReflowableWebRendition( }, onProgressionChange = { if (index == currentPageState.value) { - val item = state.publication.readingOrder[index] - val newLocation = ReflowableWebLocation( - href = item.href, - mediaType = item.mediaType, - progression = it - ) - state.updateLocation(newLocation) + state.updateLocation(currentLocation()) } }, onDocumentResized = { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt index 6244f1b327..cf52ab88c1 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt @@ -17,6 +17,7 @@ import org.readium.r2.shared.publication.Link import org.readium.r2.shared.publication.Publication import org.readium.r2.shared.publication.epub.EpubLayout import org.readium.r2.shared.publication.presentation.presentation +import org.readium.r2.shared.publication.services.PositionsService import org.readium.r2.shared.publication.services.isProtected import org.readium.r2.shared.publication.services.isRestricted import org.readium.r2.shared.util.Try @@ -32,6 +33,7 @@ import org.readium.r2.shared.util.Try public class ReflowableWebRenditionFactory private constructor( private val application: Application, private val publication: Publication, + private val positionsServices: PositionsService, private val configuration: ReflowableWebConfiguration, ) { @@ -56,9 +58,13 @@ public class ReflowableWebRenditionFactory private constructor( return null } + val positionsService = publication.findService(PositionsService::class) + ?: return null + return ReflowableWebRenditionFactory( application, publication, + positionsService, configuration ) } @@ -74,22 +80,25 @@ public class ReflowableWebRenditionFactory private constructor( ) : Error("Could not create a rendition state.", cause) } - @Suppress("RedundantSuspendModifier") public suspend fun createRenditionState( initialSettings: ReflowableWebSettings, initialLocation: ReflowableWebGoLocation? = null, readingOrder: List = publication.readingOrder, + positionsService: PositionsService = positionsServices, ): Try { // TODO: support font family declarations and reading system properties // TODO: enable apps not to disable selection when publication is protected - val readingOrderItems = readingOrder.map { + val readingOrderItems = readingOrder.mapIndexed { index, link -> ReflowableWebPublication.Item( - href = it.url(), - mediaType = it.mediaType + href = link.url(), + mediaType = link.mediaType, ) } + val positionNumbers = positionsServices.positionsByReadingOrder() + .map { it.size } + val resourceItems = (publication.readingOrder - readingOrder + publication.resources).map { ReflowableWebPublication.Item( href = it.url(), @@ -98,7 +107,7 @@ public class ReflowableWebRenditionFactory private constructor( } val renditionPublication = ReflowableWebPublication( - readingOrder = ReflowableWebPublication.ReadingOrder(readingOrderItems), + readingOrder = ReflowableWebPublication.ReadingOrder(readingOrderItems, positionNumbers), otherResources = resourceItems, container = publication.container ) From 8eb687a57f6abb8170014bd7079a1c57fef1edf6 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 27 Nov 2025 17:57:10 +0100 Subject: [PATCH 06/56] Fix location reporting --- .../web/reflowable/ReflowableWebRendition.kt | 11 +++++------ .../web/reflowable/ReflowableWebRenditionState.kt | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index ef7166a8c3..a4cc857a2e 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -127,7 +127,7 @@ public fun ReflowableWebRendition( fun currentLocation(): ReflowableWebLocation { val currentIndex = currentPageState.value val currentItem = state.publication.readingOrder.items[currentIndex] - val progression = state.resourceStates[currentPageState.value].progression + val progression = state.resourceStates[currentIndex].progression val position = state.publication.positionForProgression(currentIndex, progression) return ReflowableWebLocation( href = currentItem.href, @@ -143,9 +143,9 @@ public fun ReflowableWebRendition( state.initController(location = currentLocation()) } - LaunchedEffect(state) { + LaunchedEffect(currentPageState) { snapshotFlow { - state.pagerState.currentPage + currentPageState.value }.onEach { state.updateLocation(currentLocation()) }.launchIn(this) @@ -210,9 +210,8 @@ public fun ReflowableWebRendition( decorationListener.onDecorationActivated(event) }, onProgressionChange = { - if (index == currentPageState.value) { - state.updateLocation(currentLocation()) - } + state.resourceStates[index].progression = it + state.updateLocation(currentLocation()) }, onDocumentResized = { state.scrollState.onDocumentResized(index) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index bb90d43061..99cffb45ba 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -303,8 +303,6 @@ internal class ReflowableNavigationDelegate( mutableStateOf(null) internal fun updateLocation(location: ReflowableWebLocation) { - val index = checkNotNull(readingOrder.indexOfHref(location.href)) - resourceStates[index].progression = location.progression locationMutable.value = location } From 52ec6f9503edc353cc096b184f543c158fa5b699 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 2 Dec 2025 08:22:04 +0100 Subject: [PATCH 07/56] Fix moveToProgression in WebViewScrollController --- .../web/internals/webview/WebViewScrollController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index de265d85b4..d450c49836 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -187,14 +187,14 @@ private fun RelaxedWebView.scrollToProgression( ) { when (orientation) { Orientation.Vertical -> { - scrollTo(scrollX, progression.roundToInt() * maxScrollY) + scrollTo(scrollX, (progression * maxScrollY).roundToInt()) } Orientation.Horizontal -> when (direction) { LayoutDirection.Ltr -> { - scrollTo(progression.roundToInt() * maxScrollX, scrollY) + scrollTo((progression * maxScrollX).roundToInt(), scrollY) } LayoutDirection.Rtl -> { - scrollTo((1 - progression).roundToInt() * maxScrollX, scrollY) + scrollTo(((1 - progression) * maxScrollX).roundToInt(), scrollY) } } } From 83b3420f645133911fb9ac69830649472ddabfdf Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 2 Dec 2025 08:24:59 +0100 Subject: [PATCH 08/56] Typo --- .../web/reflowable/ReflowableWebRenditionFactory.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt index cf52ab88c1..fb70aab367 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt @@ -33,7 +33,7 @@ import org.readium.r2.shared.util.Try public class ReflowableWebRenditionFactory private constructor( private val application: Application, private val publication: Publication, - private val positionsServices: PositionsService, + private val positionsService: PositionsService, private val configuration: ReflowableWebConfiguration, ) { @@ -84,7 +84,7 @@ public class ReflowableWebRenditionFactory private constructor( initialSettings: ReflowableWebSettings, initialLocation: ReflowableWebGoLocation? = null, readingOrder: List = publication.readingOrder, - positionsService: PositionsService = positionsServices, + positionsService: PositionsService = this.positionsService, ): Try { // TODO: support font family declarations and reading system properties // TODO: enable apps not to disable selection when publication is protected @@ -96,7 +96,7 @@ public class ReflowableWebRenditionFactory private constructor( ) } - val positionNumbers = positionsServices.positionsByReadingOrder() + val positionNumbers = positionsService.positionsByReadingOrder() .map { it.size } val resourceItems = (publication.readingOrder - readingOrder + publication.resources).map { From 8646fc25a04698800c9fd4c70598e5ce2b123c99 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 2 Dec 2025 09:36:49 +0100 Subject: [PATCH 09/56] Fix going to initial progression --- .../web/reflowable/ReflowableWebRendition.kt | 4 +- .../reflowable/ReflowableWebRenditionState.kt | 97 ++++++++++++------- .../reflowable/resource/ReflowableResource.kt | 23 ++++- 3 files changed, 84 insertions(+), 40 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index a4cc857a2e..f5023b706b 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -174,7 +174,7 @@ public fun ReflowableWebRendition( .mapValues { groupDecorations -> groupDecorations.value.filter { it.location.href == href } } .toImmutableMap() - val pendingLocation = state.navigationDelegate.pendingGo.value + val pendingLocation = state.goDelegate.pendingGo.value ?.location ?.takeIf { it.href == href } @@ -217,7 +217,7 @@ public fun ReflowableWebRendition( state.scrollState.onDocumentResized(index) }, onPendingLocationConsumed = { consumedLocation -> - state.navigationDelegate.consumePendingGo(consumedLocation) + state.goDelegate.consumePendingGo(consumedLocation) } ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 99cffb45ba..589aa83923 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -92,6 +92,8 @@ public class ReflowableWebRenditionState internal constructor( disableSelection: Boolean, ) : RenditionState { + private val coroutineScope: CoroutineScope = + MainScope() private val controllerState: MutableState = mutableStateOf(null) @@ -186,11 +188,26 @@ public class ReflowableWebRenditionState internal constructor( WebViewClient(webViewServer) } + internal val goDelegate = GoDelegate( + coroutineScope = coroutineScope, + readingOrder = publication.readingOrder, + pagerState = pagerState + ) + + init { + if (initialLocation.progression == null && initialLocation.htmlId != null) { + coroutineScope.launch { + goDelegate.goTo(initialLocation) + } + } + } + internal lateinit var navigationDelegate: ReflowableNavigationDelegate internal fun initController(location: ReflowableWebLocation) { navigationDelegate = ReflowableNavigationDelegate( + goDelegate, publication.readingOrder, resourceStates, pagerState, @@ -212,6 +229,45 @@ public class ReflowableWebRenditionState internal constructor( } } +internal class GoDelegate( + private val coroutineScope: CoroutineScope, + private val readingOrder: ReflowableWebPublication.ReadingOrder, + private val pagerState: PagerState, +) { + + data class PendingGo( + val location: ReflowableWebGoLocation, + val continuation: Continuation, + ) + + internal val pendingGo: MutableState = + mutableStateOf(null) + + internal fun consumePendingGo(location: ReflowableWebGoLocation) { + coroutineScope.launch { + pendingGo.value?.let { pendingGoNow -> + if (pendingGoNow.location == location) { + pendingGo.value = null + pendingGoNow.continuation.resume(Unit) + } + } + } + } + internal suspend fun goTo(location: ReflowableWebGoLocation) { + withContext(Dispatchers.Main) { + pendingGo.value?.continuation?.resume(Unit) + pendingGo.value = null + + val resourceIndex = readingOrder.indexOfHref(location.href) ?: return@withContext + pagerState.scrollToPage(resourceIndex) + + suspendCoroutine { continuation -> + pendingGo.value = PendingGo(location, continuation) + } + } + } +} + @ExperimentalReadiumApi @Stable public class ReflowableWebRenditionController internal constructor( @@ -286,6 +342,7 @@ internal class ReflowableLayoutDelegate( @OptIn(ExperimentalReadiumApi::class, InternalReadiumApi::class) internal class ReflowableNavigationDelegate( + private val goDelegate: GoDelegate, private val readingOrder: ReflowableWebPublication.ReadingOrder, private val resourceStates: List, private val pagerState: PagerState, @@ -293,30 +350,13 @@ internal class ReflowableNavigationDelegate( initialLocation: ReflowableWebLocation, ) : NavigationController, OverflowController { - private val coroutineScope: CoroutineScope = - MainScope() - private val locationMutable: MutableState = mutableStateOf(initialLocation) - internal val pendingGo: MutableState = - mutableStateOf(null) - internal fun updateLocation(location: ReflowableWebLocation) { locationMutable.value = location } - internal fun consumePendingGo(location: ReflowableWebGoLocation) { - coroutineScope.launch { - pendingGo.value?.let { pendingGoNow -> - if (pendingGoNow.location == location) { - pendingGo.value = null - pendingGoNow.continuation.resume(Unit) - } - } - } - } - override val overflow: Overflow by overflowState override val location: ReflowableWebLocation by locationMutable @@ -329,22 +369,12 @@ internal class ReflowableNavigationDelegate( goTo(location) } - override suspend fun goTo(location: ReflowableWebLocation) { - goTo(ReflowableWebGoLocation(location.href, location.progression)) - } - override suspend fun goTo(location: ReflowableWebGoLocation) { - withContext(Dispatchers.Main) { - pendingGo.value?.continuation?.resume(Unit) - pendingGo.value = null - - val resourceIndex = readingOrder.indexOfHref(location.href) ?: return@withContext - pagerState.scrollToPage(resourceIndex) + goDelegate.goTo(location) + } - suspendCoroutine { continuation -> - pendingGo.value = ReflowablePendingGo(location, continuation) - } - } + override suspend fun goTo(location: ReflowableWebLocation) { + goTo(ReflowableWebGoLocation(location.href, location.progression)) } // This information is not available when the WebView has not yet been composed or laid out. @@ -417,11 +447,6 @@ internal class ReflowableNavigationDelegate( } } -internal data class ReflowablePendingGo( - val location: ReflowableWebGoLocation, - val continuation: Continuation, -) - internal class ReflowableDecorationDelegate( val decorationTemplates: WebDecorationTemplates, ) : DecorationController { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 4a4953c865..6839d7c3a4 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -12,6 +12,7 @@ import android.annotation.SuppressLint import android.view.ActionMode import android.view.MotionEvent import android.view.View +import android.webkit.WebView import androidx.compose.foundation.background import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.layout.Box @@ -180,8 +181,7 @@ internal fun ReflowableResource( documentStateApi.listener = DelegatingDocumentApiListener( onDocumentLoadedAndSizedDelegate = { Timber.d("resource ${resourceState.index} onDocumentLoadedAndResized") - webView.requestLayout() - webView.setNextLayoutListener { + webView.postOnWebViewUpToDateCallback { val scrollController = WebViewScrollController(webView) scrollController.moveToProgression( progression = resourceState.progression.value, @@ -372,3 +372,22 @@ private fun ReflowableWebDecoration.toWebApiDecoration( textQuote = textQuote ) } + +/** + * Best effort to delay the execution of a block until the Webview + * has received data up-to-date at the moment when the call occurs or newer. + */ +private fun RelaxedWebView.postOnWebViewUpToDateCallback(block: () -> Unit) { + requestLayout() + setNextLayoutListener { + postVisualStateCallback( + 0, + object : + WebView.VisualStateCallback() { + override fun onComplete(requestId: Long) { + block() + } + } + ) + } +} From 69375815da2c52e7b80bec1375e1129aa26cf69d Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 2 Dec 2025 11:30:46 +0100 Subject: [PATCH 10/56] Various fixes --- .../webview/WebViewScrollController.kt | 8 ++--- .../web/reflowable/ReflowableWebRendition.kt | 29 ++++++++++++++++--- .../reflowable/ReflowableWebRenditionState.kt | 15 ++++++---- .../reflowable/resource/ReflowableResource.kt | 6 ++-- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index d450c49836..d1a247510a 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -12,6 +12,7 @@ import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.util.fastCoerceAtLeast import androidx.compose.ui.util.fastCoerceAtMost import androidx.compose.ui.util.fastRoundToInt +import kotlin.math.ceil import kotlin.math.roundToInt import org.readium.navigator.web.internals.gestures.DefaultScrollable2DState import org.readium.navigator.web.internals.gestures.Scrollable2DState @@ -105,7 +106,6 @@ public class WebViewScrollController( ) { check(webView.height != 0) check(webView.width != 0) - webView.scrollToProgression( progression = progression, orientation = orientation, @@ -187,14 +187,14 @@ private fun RelaxedWebView.scrollToProgression( ) { when (orientation) { Orientation.Vertical -> { - scrollTo(scrollX, (progression * maxScrollY).roundToInt()) + scrollTo(scrollX, ceil((progression * maxScrollY)).roundToInt()) } Orientation.Horizontal -> when (direction) { LayoutDirection.Ltr -> { - scrollTo((progression * maxScrollX).roundToInt(), scrollY) + scrollTo(ceil(progression * maxScrollX).roundToInt(), scrollY) } LayoutDirection.Rtl -> { - scrollTo(((1 - progression) * maxScrollX).roundToInt(), scrollY) + scrollTo((ceil(1 - progression) * maxScrollX).roundToInt(), scrollY) } } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index f5023b706b..ae0edbeb24 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -42,6 +42,7 @@ import kotlinx.coroutines.launch import org.readium.navigator.common.DecorationListener import org.readium.navigator.common.HyperlinkListener import org.readium.navigator.common.InputListener +import org.readium.navigator.common.Progression import org.readium.navigator.common.TapContext import org.readium.navigator.common.TapEvent import org.readium.navigator.common.defaultDecorationListener @@ -138,9 +139,11 @@ public fun ReflowableWebRendition( ) } - if (state.controller == null) { - // Initialize controller. In the future, that should require access to a ready WebView. - state.initController(location = currentLocation()) + LaunchedEffect(state.controller, state.goDelegate.pendingGo.value) { + if (state.controller == null && state.goDelegate.pendingGo.value == null) { + // Initialize controller. In the future, that should require access to a ready WebView. + state.initController(location = currentLocation()) + } } LaunchedEffect(currentPageState) { @@ -217,7 +220,25 @@ public fun ReflowableWebRendition( state.scrollState.onDocumentResized(index) }, onPendingLocationConsumed = { consumedLocation -> - state.goDelegate.consumePendingGo(consumedLocation) + val currentIndex = state.publication.readingOrder.indexOfHref(consumedLocation.href)!! + state.resourceStates.forEachIndexed { index, item -> + val newProgression = when { + index < currentIndex -> Progression(1.0)!! + index > currentIndex -> Progression(0.0)!! + else -> null + } + + newProgression?.let { newProgression -> + item.progression = newProgression + item.scrollController.value?.moveToProgression( + progression = newProgression.value, + snap = !state.layoutDelegate.settings.scroll, + orientation = state.layoutDelegate.orientation, + direction = layoutDirection + ) + } + } + state.goDelegate.resumeGo(consumedLocation) } ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 589aa83923..01f35083e4 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -191,6 +191,7 @@ public class ReflowableWebRenditionState internal constructor( internal val goDelegate = GoDelegate( coroutineScope = coroutineScope, readingOrder = publication.readingOrder, + resourceStates = resourceStates, pagerState = pagerState ) @@ -232,6 +233,7 @@ public class ReflowableWebRenditionState internal constructor( internal class GoDelegate( private val coroutineScope: CoroutineScope, private val readingOrder: ReflowableWebPublication.ReadingOrder, + private val resourceStates: List, private val pagerState: PagerState, ) { @@ -243,13 +245,15 @@ internal class GoDelegate( internal val pendingGo: MutableState = mutableStateOf(null) - internal fun consumePendingGo(location: ReflowableWebGoLocation) { - coroutineScope.launch { + internal fun resumeGo(location: ReflowableWebGoLocation) { + coroutineScope.launch { // on the main thread pendingGo.value?.let { pendingGoNow -> - if (pendingGoNow.location == location) { - pendingGo.value = null - pendingGoNow.continuation.resume(Unit) + if (pendingGoNow.location != location) { + return@launch } + + pendingGo.value = null + pendingGoNow.continuation.resume(Unit) } } } @@ -257,7 +261,6 @@ internal class GoDelegate( withContext(Dispatchers.Main) { pendingGo.value?.continuation?.resume(Unit) pendingGo.value = null - val resourceIndex = readingOrder.indexOfHref(location.href) ?: return@withContext pagerState.scrollToPage(resourceIndex) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 6839d7c3a4..593f84174a 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -215,11 +215,13 @@ internal fun ReflowableResource( moveApi?.let { moveApi -> pendingLocation?.let { resourceState.scrollController.value?.let { scrollController -> - moveApi.getOffsetForLocation( + val offset = moveApi.getOffsetForLocation( progression = pendingLocation.progression, htmlId = pendingLocation.htmlId, orientation = orientation - )?.let { offset -> + ) + + offset?.let { offset -> scrollController.moveToOffset( offset = with(density) { offset.dp.roundToPx() }, snap = !scroll, From 737affc35ab5ff1d63269a3d33da9efa80a9bf7e Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 2 Dec 2025 11:40:37 +0100 Subject: [PATCH 11/56] Simplify uses of callbacks on WebView ready --- .../web/internals/webview/RelaxedWebView.kt | 11 +++++++++ .../web/internals/webview/WebViewUtil.kt | 16 ++++++------- .../reflowable/resource/ReflowableResource.kt | 23 ++----------------- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt index 243125509a..407f0befee 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt @@ -97,3 +97,14 @@ private class Callback2Wrapper( callback2?.onGetContentRect(mode, view, outRect) ?: super.onGetContentRect(mode, view, outRect) } + +/** + * Best effort to delay the execution of a block until the Webview + * has received data up-to-date at the moment when the call occurs or newer. + */ +public fun RelaxedWebView.invokeOnWebViewUpToDate(block: WebView.() -> Unit) { + requestLayout() + setNextLayoutListener { + invokeOnReadyToBeDrawn(block) + } +} diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt index b1281c0ab3..090fc055ad 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt @@ -13,16 +13,14 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext internal fun WebView.invokeOnReadyToBeDrawn(callback: (WebView) -> Unit) { - post { - postVisualStateCallback( - 0, - object : WebView.VisualStateCallback() { - override fun onComplete(requestId: Long) { - callback(this@invokeOnReadyToBeDrawn) - } + postVisualStateCallback( + 0, + object : WebView.VisualStateCallback() { + override fun onComplete(requestId: Long) { + callback(this@invokeOnReadyToBeDrawn) } - ) - } + } + ) } public suspend fun WebView.evaluateJavaScriptSuspend(javascript: String): String = diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 593f84174a..e10a87ea9c 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -12,7 +12,6 @@ import android.annotation.SuppressLint import android.view.ActionMode import android.view.MotionEvent import android.view.View -import android.webkit.WebView import androidx.compose.foundation.background import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.layout.Box @@ -62,6 +61,7 @@ import org.readium.navigator.web.internals.webapi.ReflowableSelectionApi import org.readium.navigator.web.internals.webview.RelaxedWebView import org.readium.navigator.web.internals.webview.WebView import org.readium.navigator.web.internals.webview.WebViewScrollController +import org.readium.navigator.web.internals.webview.invokeOnWebViewUpToDate import org.readium.navigator.web.internals.webview.rememberWebViewState import org.readium.navigator.web.reflowable.ReflowableWebDecoration import org.readium.navigator.web.reflowable.ReflowableWebDecorationCssSelectorLocation @@ -181,7 +181,7 @@ internal fun ReflowableResource( documentStateApi.listener = DelegatingDocumentApiListener( onDocumentLoadedAndSizedDelegate = { Timber.d("resource ${resourceState.index} onDocumentLoadedAndResized") - webView.postOnWebViewUpToDateCallback { + webView.invokeOnWebViewUpToDate { val scrollController = WebViewScrollController(webView) scrollController.moveToProgression( progression = resourceState.progression.value, @@ -374,22 +374,3 @@ private fun ReflowableWebDecoration.toWebApiDecoration( textQuote = textQuote ) } - -/** - * Best effort to delay the execution of a block until the Webview - * has received data up-to-date at the moment when the call occurs or newer. - */ -private fun RelaxedWebView.postOnWebViewUpToDateCallback(block: () -> Unit) { - requestLayout() - setNextLayoutListener { - postVisualStateCallback( - 0, - object : - WebView.VisualStateCallback() { - override fun onComplete(requestId: Long) { - block() - } - } - ) - } -} From 12146584ff7c0206e46ecb0e5317621886803d19 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 4 Dec 2025 10:56:08 +0100 Subject: [PATCH 12/56] Fix progression restoration and add viewport --- .../navigator/common/LocationElements.kt | 13 ++++++- .../webview/WebViewScrollController.kt | 37 ++++++++++++++----- .../web/reflowable/ReflowableWebRendition.kt | 6 +-- .../reflowable/ReflowableWebRenditionState.kt | 34 ++++++++++++++--- .../reflowable/resource/ReflowableResource.kt | 14 ++++++- .../resource/ReflowableResourceState.kt | 32 +++++++++++++++- .../resource/ReflowableWebViewport.kt | 25 +++++++++++++ 7 files changed, 138 insertions(+), 23 deletions(-) create mode 100644 readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt diff --git a/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt b/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt index b8a3d66b49..b8d39d99c0 100644 --- a/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt +++ b/readium/navigators/common/src/main/java/org/readium/navigator/common/LocationElements.kt @@ -33,7 +33,11 @@ public value class CssSelector( @JvmInline public value class Progression private constructor( public val value: Double, -) { +) : Comparable { + + override fun compareTo(other: Progression): Int { + return value.compareTo(other.value) + } public companion object { @@ -50,7 +54,12 @@ public value class Progression private constructor( @JvmInline public value class Position private constructor( public val value: Int, -) { +) : Comparable { + + override fun compareTo(other: Position): Int { + return value.compareTo(other.value) + } + public companion object { public operator fun invoke(value: Int): Position? = diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index d1a247510a..b8ffb2ea1d 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -16,6 +16,7 @@ import kotlin.math.ceil import kotlin.math.roundToInt import org.readium.navigator.web.internals.gestures.DefaultScrollable2DState import org.readium.navigator.web.internals.gestures.Scrollable2DState +import org.readium.r2.shared.ExperimentalReadiumApi public class WebViewScrollController( private val webView: RelaxedWebView, @@ -95,8 +96,11 @@ public class WebViewScrollController( } } - public fun progression(orientation: Orientation, direction: LayoutDirection): Double? = - webView.progression(orientation, direction).takeIf { it.isFinite() } + public fun startProgression(orientation: Orientation, direction: LayoutDirection): Double? = + webView.startProgression(orientation, direction).takeIf { it.isFinite() } + + public fun endProgression(orientation: Orientation, direction: LayoutDirection): Double? = + webView.endProgression(orientation, direction).takeIf { it.isFinite() } public fun moveToProgression( progression: Double, @@ -185,16 +189,19 @@ private fun RelaxedWebView.scrollToProgression( orientation: Orientation, direction: LayoutDirection, ) { + val docHeight = maxScrollY + height + val docWidth = maxScrollX + width + when (orientation) { Orientation.Vertical -> { - scrollTo(scrollX, ceil((progression * maxScrollY)).roundToInt()) + scrollTo(scrollX, ceil((progression * docHeight)).roundToInt()) } Orientation.Horizontal -> when (direction) { LayoutDirection.Ltr -> { - scrollTo(ceil(progression * maxScrollX).roundToInt(), scrollY) + scrollTo(ceil(progression * docWidth).roundToInt(), scrollY) } LayoutDirection.Rtl -> { - scrollTo((ceil(1 - progression) * maxScrollX).roundToInt(), scrollY) + scrollTo((ceil(1 - progression) * docWidth).roundToInt(), scrollY) } } } @@ -214,14 +221,26 @@ private fun RelaxedWebView.scrollToOffset( } } -private fun RelaxedWebView.progression( +@OptIn(ExperimentalReadiumApi::class) +private fun RelaxedWebView.startProgression( + orientation: Orientation, + direction: LayoutDirection, +) = when (orientation) { + Orientation.Vertical -> scrollY / (maxScrollY + height).toDouble() + Orientation.Horizontal -> when (direction) { + LayoutDirection.Ltr -> (scrollX / (maxScrollX + width).toDouble()) + LayoutDirection.Rtl -> 1 - scrollX / (maxScrollX + width).toDouble() + } +} + +private fun RelaxedWebView.endProgression( orientation: Orientation, direction: LayoutDirection, ) = when (orientation) { - Orientation.Vertical -> scrollY / maxScrollY.toDouble() + Orientation.Vertical -> (scrollY + height) / (maxScrollY + height).toDouble() Orientation.Horizontal -> when (direction) { - LayoutDirection.Ltr -> scrollX / maxScrollX.toDouble() - LayoutDirection.Rtl -> 1 - scrollX / maxScrollX.toDouble() + LayoutDirection.Ltr -> (scrollX + width) / (maxScrollX + width).toDouble() + LayoutDirection.Rtl -> 1 - (scrollX + width) / (maxScrollX + width).toDouble() } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index ae0edbeb24..20c882bcc0 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -128,7 +128,7 @@ public fun ReflowableWebRendition( fun currentLocation(): ReflowableWebLocation { val currentIndex = currentPageState.value val currentItem = state.publication.readingOrder.items[currentIndex] - val progression = state.resourceStates[currentIndex].progression + val progression = state.resourceStates[currentIndex].startProgression val position = state.publication.positionForProgression(currentIndex, progression) return ReflowableWebLocation( href = currentItem.href, @@ -213,7 +213,7 @@ public fun ReflowableWebRendition( decorationListener.onDecorationActivated(event) }, onProgressionChange = { - state.resourceStates[index].progression = it + state.resourceStates[index].updateProgression(it, state.layoutDelegate.orientation, layoutDirection) state.updateLocation(currentLocation()) }, onDocumentResized = { @@ -229,7 +229,7 @@ public fun ReflowableWebRendition( } newProgression?.let { newProgression -> - item.progression = newProgression + item.updateProgression(newProgression, state.layoutDelegate.orientation, layoutDirection) item.scrollController.value?.moveToProgression( progression = newProgression.value, snap = !state.layoutDelegate.settings.scroll, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 01f35083e4..68bf13b597 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -66,6 +66,7 @@ import org.readium.navigator.web.reflowable.css.withSettings import org.readium.navigator.web.reflowable.injection.injectHtmlReflowable import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings import org.readium.navigator.web.reflowable.resource.ReflowableResourceState +import org.readium.navigator.web.reflowable.resource.ReflowableWebViewport import org.readium.r2.navigator.preferences.Axis import org.readium.r2.navigator.preferences.FontFamily import org.readium.r2.shared.ExperimentalReadiumApi @@ -113,7 +114,7 @@ public class ReflowableWebRenditionState internal constructor( ReflowableResourceState( index = index, href = item.href, - progression = Progression(progression)!! + initialProgression = Progression(progression)!! ) } @@ -209,7 +210,7 @@ public class ReflowableWebRenditionState internal constructor( navigationDelegate = ReflowableNavigationDelegate( goDelegate, - publication.readingOrder, + publication, resourceStates, pagerState, layoutDelegate.overflow, @@ -282,7 +283,11 @@ public class ReflowableWebRenditionController internal constructor( OverflowController by navigationDelegate, SettingsController by layoutDelegate, DecorationController by decorationDelegate, - SelectionController by selectionDelegate + SelectionController by selectionDelegate { + + public val viewport: ReflowableWebViewport get() = + navigationDelegate.viewport + } @OptIn(ExperimentalReadiumApi::class, InternalReadiumApi::class) internal class ReflowableLayoutDelegate( @@ -346,7 +351,7 @@ internal class ReflowableLayoutDelegate( @OptIn(ExperimentalReadiumApi::class, InternalReadiumApi::class) internal class ReflowableNavigationDelegate( private val goDelegate: GoDelegate, - private val readingOrder: ReflowableWebPublication.ReadingOrder, + private val publication: ReflowableWebPublication, private val resourceStates: List, private val pagerState: PagerState, overflowState: State, @@ -364,6 +369,23 @@ internal class ReflowableNavigationDelegate( override val location: ReflowableWebLocation by locationMutable + val viewport: ReflowableWebViewport get() { + val visibleItemsWithProgression = pagerState.layoutInfo.visiblePagesInfo.map { it.index } + .mapNotNull { index -> resourceStates[index].progressionRange?.let { index to it } } + val visibleItems = visibleItemsWithProgression.map { it.first } + val progressions = visibleItemsWithProgression.map { it.second } + + val positionStart = publication + .positionForProgression(visibleItems.first(), progressions.first().start) + val positionEnd = publication + .positionForProgression(visibleItems.last(), progressions.last().endInclusive) + return ReflowableWebViewport( + readingOrder = visibleItems.first()..visibleItems.last(), + progressions = progressions, + positions = positionStart..positionEnd + ) + } + override suspend fun goTo(url: Url) { val location = ReflowableWebGoLocation( href = url.removeFragment(), @@ -384,7 +406,7 @@ internal class ReflowableNavigationDelegate( // We assume that the best UI behavior would be to have a possible forward button disabled // and return false when we can't tell. override val canMoveForward: Boolean - get() = pagerState.currentPage < readingOrder.items.size - 1 || run { + get() = pagerState.currentPage < publication.readingOrder.items.size - 1 || run { val currentResourceState = resourceStates[pagerState.currentPage] val scrollController = currentResourceState.scrollController.value ?: return false return scrollController.canMoveForward() @@ -402,7 +424,7 @@ internal class ReflowableNavigationDelegate( val scrollController = currentResourceState.scrollController.value ?: return if (scrollController.canMoveForward()) { scrollController.moveForward() - } else if (pagerState.currentPage < readingOrder.items.size - 1) { + } else if (pagerState.currentPage < publication.readingOrder.items.size - 1) { pagerState.scrollToPage(pagerState.currentPage + 1) } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index e10a87ea9c..68343c23e3 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -184,15 +184,20 @@ internal fun ReflowableResource( webView.invokeOnWebViewUpToDate { val scrollController = WebViewScrollController(webView) scrollController.moveToProgression( - progression = resourceState.progression.value, + progression = resourceState.startProgression.value, snap = !scroll, orientation = orientation, direction = layoutDirection ) resourceState.scrollController.value = scrollController + resourceState.updateProgression( + startProgression = resourceState.startProgression, + orientation = orientation, + direction = layoutDirection + ) Timber.d("resource ${resourceState.index} ready to scroll") webView.setOnScrollChangeListener { view, scrollX, scrollY, oldScrollX, oldScrollY -> - scrollController.progression( + scrollController.startProgression( orientation, layoutDirection )?.let { onProgressionChange(Progression(it)!!) } @@ -202,6 +207,11 @@ internal fun ReflowableResource( }, onDocumentResizedDelegate = { Timber.d("resource ${resourceState.index} onDocumentResized") + resourceState.updateProgression( + startProgression = resourceState.startProgression, + orientation = orientation, + direction = layoutDirection + ) onDocumentResized.invoke() } ) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt index d800dcbbd0..e937ce7bdf 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt @@ -8,9 +8,11 @@ package org.readium.navigator.web.reflowable.resource +import androidx.compose.foundation.gestures.Orientation import androidx.compose.runtime.MutableState import androidx.compose.runtime.Stable import androidx.compose.runtime.mutableStateOf +import androidx.compose.ui.unit.LayoutDirection import org.readium.navigator.common.Progression import org.readium.navigator.web.internals.pager.PageScrollState import org.readium.navigator.web.internals.webview.WebViewScrollController @@ -21,8 +23,36 @@ import org.readium.r2.shared.util.Url internal class ReflowableResourceState( val index: Int, val href: Url, - var progression: Progression, + initialProgression: Progression, ) : PageScrollState { + var startProgression: Progression = initialProgression + private set + private var lastComputedProgressionRange: ClosedRange? = null + + val progressionRange: ClosedRange? get() = + lastComputedProgressionRange + + fun updateProgression( + startProgression: Progression, + orientation: Orientation, + direction: LayoutDirection, + ) { + this.startProgression = startProgression + updateProgressionRange(startProgression, orientation, direction) + } + + private fun updateProgressionRange( + start: Progression, + orientation: Orientation, + direction: LayoutDirection, + ) { + val end = scrollController.value?.endProgression( + orientation = orientation, + direction = direction + )?.let { Progression(it) } + end?.let { lastComputedProgressionRange = start..end } + } + override val scrollController: MutableState = mutableStateOf(null) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt new file mode 100644 index 0000000000..5d0183af19 --- /dev/null +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt @@ -0,0 +1,25 @@ +package org.readium.navigator.web.reflowable.resource + +import org.readium.navigator.common.Position +import org.readium.navigator.common.Progression +import org.readium.r2.shared.ExperimentalReadiumApi + +/** Information about the visible portion of the publication. */ +@ExperimentalReadiumApi +public data class ReflowableWebViewport( + + /** + * Range of visible reading order resources. + */ + public val readingOrder: ClosedRange, + + /** + * Range of visible scroll progressions for each visible reading order resource. + */ + public val progressions: List>, + + /** + * Range of visible positions. + */ + public val positions: ClosedRange, +) From ba9ee678f255cf7e181892dc5c55a76116bbbf48 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Sat, 6 Dec 2025 06:45:18 +0100 Subject: [PATCH 13/56] Add viewport and refactor go --- .../webview/WebViewScrollController.kt | 26 ++- .../web/internals/webview/WebViewUtil.kt | 16 +- .../reflowable/ReflowableWebPublication.kt | 5 + .../web/reflowable/ReflowableWebRendition.kt | 59 +---- .../ReflowableWebRenditionFactory.kt | 1 - .../reflowable/ReflowableWebRenditionState.kt | 208 ++++++++++-------- .../reflowable/resource/ReflowableResource.kt | 111 ++++++---- .../resource/ReflowableResourceState.kt | 72 ++++-- .../resource/ReflowableWebViewport.kt | 5 +- 9 files changed, 280 insertions(+), 223 deletions(-) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index b8ffb2ea1d..e86a1ff953 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -17,6 +17,7 @@ import kotlin.math.roundToInt import org.readium.navigator.web.internals.gestures.DefaultScrollable2DState import org.readium.navigator.web.internals.gestures.Scrollable2DState import org.readium.r2.shared.ExperimentalReadiumApi +import timber.log.Timber public class WebViewScrollController( private val webView: RelaxedWebView, @@ -40,10 +41,10 @@ public class WebViewScrollController( get() = webView.maxScrollX - webView.scrollX > webView.width / 2 public val canMoveTop: Boolean - get() = webView.scrollY > webView.width / 2 + get() = webView.scrollY > webView.height / 2 public val canMoveBottom: Boolean - get() = webView.maxScrollY - webView.scrollY > webView.width / 2 + get() = webView.maxScrollY - webView.scrollY > webView.height / 2 public fun moveLeft() { webView.scrollBy(-webView.width, 0) @@ -54,11 +55,11 @@ public class WebViewScrollController( } public fun moveTop() { - webView.scrollBy(0, -webView.width) + webView.scrollBy(0, -webView.height) } public fun moveBottom() { - webView.scrollBy(0, webView.width) + webView.scrollBy(0, webView.height) } public fun scrollBy(delta: Offset): Offset { @@ -110,11 +111,13 @@ public class WebViewScrollController( ) { check(webView.height != 0) check(webView.width != 0) + webView.scrollToProgression( progression = progression, orientation = orientation, direction = direction ) + if (snap) { snap(orientation) } @@ -228,7 +231,7 @@ private fun RelaxedWebView.startProgression( ) = when (orientation) { Orientation.Vertical -> scrollY / (maxScrollY + height).toDouble() Orientation.Horizontal -> when (direction) { - LayoutDirection.Ltr -> (scrollX / (maxScrollX + width).toDouble()) + LayoutDirection.Ltr -> scrollX / (maxScrollX + width).toDouble() LayoutDirection.Rtl -> 1 - scrollX / (maxScrollX + width).toDouble() } } @@ -236,11 +239,14 @@ private fun RelaxedWebView.startProgression( private fun RelaxedWebView.endProgression( orientation: Orientation, direction: LayoutDirection, -) = when (orientation) { - Orientation.Vertical -> (scrollY + height) / (maxScrollY + height).toDouble() - Orientation.Horizontal -> when (direction) { - LayoutDirection.Ltr -> (scrollX + width) / (maxScrollX + width).toDouble() - LayoutDirection.Rtl -> 1 - (scrollX + width) / (maxScrollX + width).toDouble() +): Double { + Timber.d("endProgression $scrollX $width $maxScrollX") + return when (orientation) { + Orientation.Vertical -> (scrollY + height) / (maxScrollY + height).toDouble() + Orientation.Horizontal -> when (direction) { + LayoutDirection.Ltr -> (scrollX + width) / (maxScrollX + width).toDouble() + LayoutDirection.Rtl -> 1 - (scrollX + width) / (maxScrollX + width).toDouble() + } } } diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt index 090fc055ad..b1281c0ab3 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewUtil.kt @@ -13,14 +13,16 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext internal fun WebView.invokeOnReadyToBeDrawn(callback: (WebView) -> Unit) { - postVisualStateCallback( - 0, - object : WebView.VisualStateCallback() { - override fun onComplete(requestId: Long) { - callback(this@invokeOnReadyToBeDrawn) + post { + postVisualStateCallback( + 0, + object : WebView.VisualStateCallback() { + override fun onComplete(requestId: Long) { + callback(this@invokeOnReadyToBeDrawn) + } } - } - ) + ) + } } public suspend fun WebView.evaluateJavaScriptSuspend(javascript: String): String = diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt index aae3e2c14e..91c936f727 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt @@ -60,6 +60,11 @@ internal class ReflowableWebPublication( fun itemWithHref(href: Url): Item? = allItems.firstOrNull { it.href == href } + fun positionForProgression(href: Url, progression: Progression): Position { + val index = readingOrder.indexOfHref(href)!! + return positionForProgression(index, progression) + } + fun positionForProgression(index: Int, progression: Progression): Position { val itemPositionNumber = readingOrder.positionNumbers[index] val localPosition = floor(progression.value * itemPositionNumber).toInt() diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index 20c882bcc0..707fed41c2 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -20,8 +20,6 @@ import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.derivedStateOf -import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier @@ -42,7 +40,6 @@ import kotlinx.coroutines.launch import org.readium.navigator.common.DecorationListener import org.readium.navigator.common.HyperlinkListener import org.readium.navigator.common.InputListener -import org.readium.navigator.common.Progression import org.readium.navigator.common.TapContext import org.readium.navigator.common.TapEvent import org.readium.navigator.common.defaultDecorationListener @@ -123,34 +120,13 @@ public fun ReflowableWebRendition( val backgroundColor = Color(state.layoutDelegate.settings.backgroundColor.int) - val currentPageState = remember(state) { derivedStateOf { state.pagerState.currentPage } } - - fun currentLocation(): ReflowableWebLocation { - val currentIndex = currentPageState.value - val currentItem = state.publication.readingOrder.items[currentIndex] - val progression = state.resourceStates[currentIndex].startProgression - val position = state.publication.positionForProgression(currentIndex, progression) - return ReflowableWebLocation( - href = currentItem.href, - mediaType = currentItem.mediaType, - progression = progression, - position = position, - totalProgression = state.publication.totalProgressionForPosition(position) - ) - } - - LaunchedEffect(state.controller, state.goDelegate.pendingGo.value) { - if (state.controller == null && state.goDelegate.pendingGo.value == null) { - // Initialize controller. In the future, that should require access to a ready WebView. - state.initController(location = currentLocation()) - } - } + val currentPageState = state.pagerState.currentPage LaunchedEffect(currentPageState) { snapshotFlow { - currentPageState.value + currentPageState }.onEach { - state.updateLocation(currentLocation()) + state.updateLocation() }.launchIn(this) } @@ -177,13 +153,8 @@ public fun ReflowableWebRendition( .mapValues { groupDecorations -> groupDecorations.value.filter { it.location.href == href } } .toImmutableMap() - val pendingLocation = state.goDelegate.pendingGo.value - ?.location - ?.takeIf { it.href == href } - ReflowableResource( resourceState = state.resourceStates[index], - pendingLocation = pendingLocation, publicationBaseUrl = WebViewServer.publicationBaseHref, webViewClient = state.webViewClient, backgroundColor = backgroundColor, @@ -213,32 +184,10 @@ public fun ReflowableWebRendition( decorationListener.onDecorationActivated(event) }, onProgressionChange = { - state.resourceStates[index].updateProgression(it, state.layoutDelegate.orientation, layoutDirection) - state.updateLocation(currentLocation()) + state.updateLocation() }, onDocumentResized = { state.scrollState.onDocumentResized(index) - }, - onPendingLocationConsumed = { consumedLocation -> - val currentIndex = state.publication.readingOrder.indexOfHref(consumedLocation.href)!! - state.resourceStates.forEachIndexed { index, item -> - val newProgression = when { - index < currentIndex -> Progression(1.0)!! - index > currentIndex -> Progression(0.0)!! - else -> null - } - - newProgression?.let { newProgression -> - item.updateProgression(newProgression, state.layoutDelegate.orientation, layoutDirection) - item.scrollController.value?.moveToProgression( - progression = newProgression.value, - snap = !state.layoutDelegate.settings.scroll, - orientation = state.layoutDelegate.orientation, - direction = layoutDirection - ) - } - } - state.goDelegate.resumeGo(consumedLocation) } ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt index fb70aab367..40ef20bb01 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionFactory.kt @@ -86,7 +86,6 @@ public class ReflowableWebRenditionFactory private constructor( readingOrder: List = publication.readingOrder, positionsService: PositionsService = this.positionsService, ): Try { - // TODO: support font family declarations and reading system properties // TODO: enable apps not to disable selection when publication is protected val readingOrderItems = readingOrder.mapIndexed { index, link -> diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 68bf13b597..0f9ddf1e3d 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -22,17 +22,12 @@ import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import kotlin.coroutines.Continuation -import kotlin.coroutines.resume import kotlin.coroutines.suspendCoroutine import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentMapOf -import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.MainScope -import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.readium.navigator.common.DecorationController import org.readium.navigator.common.HtmlId @@ -65,6 +60,7 @@ import org.readium.navigator.web.reflowable.css.withLayout import org.readium.navigator.web.reflowable.css.withSettings import org.readium.navigator.web.reflowable.injection.injectHtmlReflowable import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings +import org.readium.navigator.web.reflowable.resource.ReflowableResourceLocation import org.readium.navigator.web.reflowable.resource.ReflowableResourceState import org.readium.navigator.web.reflowable.resource.ReflowableWebViewport import org.readium.r2.navigator.preferences.Axis @@ -75,6 +71,7 @@ import org.readium.r2.shared.util.RelativeUrl import org.readium.r2.shared.util.Url import org.readium.r2.shared.util.mediatype.MediaType import org.readium.r2.shared.util.resource.Resource +import timber.log.Timber /** * State holder for the rendition of a reflowable Web publication. @@ -92,31 +89,31 @@ public class ReflowableWebRenditionState internal constructor( configuration: ReflowableWebConfiguration, disableSelection: Boolean, ) : RenditionState { - - private val coroutineScope: CoroutineScope = - MainScope() private val controllerState: MutableState = mutableStateOf(null) override val controller: ReflowableWebRenditionController? by controllerState - private val initialResource = publication.readingOrder - .indexOfHref(initialLocation.href) - ?: 0 + private val initialResourceIndex = + publication.readingOrder.indexOfHref(initialLocation.href) ?: 0 + + internal val pagerState: PagerState = + PagerState( + currentPage = initialResourceIndex, + pageCount = { publication.readingOrder.size } + ) internal val resourceStates: List = - publication.readingOrder.items.mapIndexed { index, item -> - val progression = when { - index < initialResource -> 1.0 - index > initialResource -> 0.0 - else -> initialLocation.progression?.value ?: 0.0 + initialLocation.toResourceLocations(initialResourceIndex, publication.readingOrder) + .also { Timber.d("destByResource $it") } + .zip(publication.readingOrder.items) + .mapIndexed { index, (location, item) -> + ReflowableResourceState( + index = index, + href = item.href, + initialLocation = location + ) } - ReflowableResourceState( - index = index, - href = item.href, - initialProgression = Progression(progression)!! - ) - } private val fontFamilyDeclarations: List = buildList { @@ -139,12 +136,6 @@ public class ReflowableWebRenditionState internal constructor( initialSettings ) - internal val pagerState: PagerState = - PagerState( - currentPage = initialResource, - pageCount = { publication.readingOrder.size } - ) - internal val scrollState: RenditionScrollState = RenditionScrollState( pagerState = pagerState, @@ -190,23 +181,65 @@ public class ReflowableWebRenditionState internal constructor( } internal val goDelegate = GoDelegate( - coroutineScope = coroutineScope, readingOrder = publication.readingOrder, resourceStates = resourceStates, pagerState = pagerState ) - init { - if (initialLocation.progression == null && initialLocation.htmlId != null) { - coroutineScope.launch { - goDelegate.goTo(initialLocation) - } + internal lateinit var navigationDelegate: ReflowableNavigationDelegate + + internal fun updateLocation() { + val location = computeLocation() ?: return + val viewport = computeViewport() ?: return + if (!::navigationDelegate.isInitialized) { + initController(location, viewport) + } else { + navigationDelegate.updateLocation(location, viewport) } } - internal lateinit var navigationDelegate: ReflowableNavigationDelegate + private fun computeLocation(): ReflowableWebLocation? { + val currentIndex = pagerState.currentPage + val currentItem = publication.readingOrder.items[currentIndex] + val progression = resourceStates[currentIndex].progressionRange?.start ?: return null + val position = publication.positionForProgression(currentIndex, progression) + return ReflowableWebLocation( + href = currentItem.href, + mediaType = currentItem.mediaType, + progression = progression, + position = position, + totalProgression = publication.totalProgressionForPosition(position) + ) + } + + private fun computeViewport(): ReflowableWebViewport? { + val visibleIndexedItems = pagerState.layoutInfo.visiblePagesInfo + .map { it.index to publication.readingOrder[it.index] } + + check(visibleIndexedItems.isNotEmpty()) + + val progressions = visibleIndexedItems + .mapNotNull { (index, _) -> resourceStates[index].progressionRange } + + if (progressions.size != visibleIndexedItems.size) { + return null + } + + val positionStart = publication + .positionForProgression(visibleIndexedItems.first().first, progressions.first().start) - internal fun initController(location: ReflowableWebLocation) { + val positionEnd = publication + .positionForProgression(visibleIndexedItems.last().first, progressions.last().endInclusive) + + return ReflowableWebViewport( + readingOrder = visibleIndexedItems.map { it.second.href }, + progressions = visibleIndexedItems.zip(progressions) + .associate { (indexedItem, progression) -> indexedItem.second.href to progression }, + positions = positionStart..positionEnd + ) + } + + internal fun initController(location: ReflowableWebLocation, viewport: ReflowableWebViewport) { navigationDelegate = ReflowableNavigationDelegate( goDelegate, @@ -214,7 +247,8 @@ public class ReflowableWebRenditionState internal constructor( resourceStates, pagerState, layoutDelegate.overflow, - location + location, + viewport ) controllerState.value = ReflowableWebRenditionController( @@ -223,50 +257,29 @@ public class ReflowableWebRenditionState internal constructor( decorationDelegate, selectionDelegate ) - updateLocation(location) - } - - internal fun updateLocation(location: ReflowableWebLocation) { - navigationDelegate.updateLocation(location) } } internal class GoDelegate( - private val coroutineScope: CoroutineScope, private val readingOrder: ReflowableWebPublication.ReadingOrder, private val resourceStates: List, private val pagerState: PagerState, ) { - - data class PendingGo( - val location: ReflowableWebGoLocation, - val continuation: Continuation, - ) - - internal val pendingGo: MutableState = - mutableStateOf(null) - - internal fun resumeGo(location: ReflowableWebGoLocation) { - coroutineScope.launch { // on the main thread - pendingGo.value?.let { pendingGoNow -> - if (pendingGoNow.location != location) { - return@launch - } - - pendingGo.value = null - pendingGoNow.continuation.resume(Unit) - } - } - } internal suspend fun goTo(location: ReflowableWebGoLocation) { withContext(Dispatchers.Main) { - pendingGo.value?.continuation?.resume(Unit) - pendingGo.value = null - val resourceIndex = readingOrder.indexOfHref(location.href) ?: return@withContext - pagerState.scrollToPage(resourceIndex) + val destIndex = readingOrder.indexOfHref(location.href) ?: return@withContext + val destLocationByResource = location.toResourceLocations(destIndex, readingOrder) + Timber.d("destByResource $destLocationByResource") + + pagerState.scrollToPage(destIndex) suspendCoroutine { continuation -> - pendingGo.value = PendingGo(location, continuation) + resourceStates.zip(destLocationByResource).forEach { (state, location) -> + state.go( + location = location, + continuation = continuation.takeIf { state === resourceStates[destIndex] } + ) + } } } } @@ -287,7 +300,7 @@ public class ReflowableWebRenditionController internal constructor( public val viewport: ReflowableWebViewport get() = navigationDelegate.viewport - } +} @OptIn(ExperimentalReadiumApi::class, InternalReadiumApi::class) internal class ReflowableLayoutDelegate( @@ -356,35 +369,25 @@ internal class ReflowableNavigationDelegate( private val pagerState: PagerState, overflowState: State, initialLocation: ReflowableWebLocation, + initialViewport: ReflowableWebViewport, ) : NavigationController, OverflowController { private val locationMutable: MutableState = mutableStateOf(initialLocation) - internal fun updateLocation(location: ReflowableWebLocation) { + private val viewportMutable: MutableState = + mutableStateOf(initialViewport) + + fun updateLocation(location: ReflowableWebLocation, viewport: ReflowableWebViewport) { locationMutable.value = location + viewportMutable.value = viewport } override val overflow: Overflow by overflowState override val location: ReflowableWebLocation by locationMutable - val viewport: ReflowableWebViewport get() { - val visibleItemsWithProgression = pagerState.layoutInfo.visiblePagesInfo.map { it.index } - .mapNotNull { index -> resourceStates[index].progressionRange?.let { index to it } } - val visibleItems = visibleItemsWithProgression.map { it.first } - val progressions = visibleItemsWithProgression.map { it.second } - - val positionStart = publication - .positionForProgression(visibleItems.first(), progressions.first().start) - val positionEnd = publication - .positionForProgression(visibleItems.last(), progressions.last().endInclusive) - return ReflowableWebViewport( - readingOrder = visibleItems.first()..visibleItems.last(), - progressions = progressions, - positions = positionStart..positionEnd - ) - } + val viewport: ReflowableWebViewport by viewportMutable override suspend fun goTo(url: Url) { val location = ReflowableWebGoLocation( @@ -461,15 +464,6 @@ internal class ReflowableNavigationDelegate( orientation = overflow.axis.toOrientation(), direction = overflow.readingProgression.toLayoutDirection() ) - - private fun WebViewScrollController.moveToProgression(progression: Progression) { - moveToProgression( - progression = progression.value, - snap = !overflow.scroll, - orientation = overflow.axis.toOrientation(), - direction = overflow.readingProgression.toLayoutDirection() - ) - } } internal class ReflowableDecorationDelegate( @@ -519,3 +513,25 @@ internal class ReflowableSelectionDelegate( } } } + +private fun ReflowableWebGoLocation.toResourceLocations( + destIndex: Int, + readingOrder: ReflowableWebPublication.ReadingOrder, +): List { + val resourceLocation = progression + ?.let { ReflowableResourceLocation.Progression(it) } + ?: htmlId?.let { ReflowableResourceLocation.HtmlId(it) } + ?: ReflowableResourceLocation.Progression(Progression(0.0)!!) + + return readingOrder.items.mapIndexed { index, state -> + when { + index < destIndex -> + ReflowableResourceLocation.Progression(Progression(1.0)!!) + + index > destIndex -> + ReflowableResourceLocation.Progression(Progression(0.0)!!) + + else -> resourceLocation + } + } +} diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 68343c23e3..d03fd91b62 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -36,7 +36,6 @@ import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import org.readium.navigator.common.DecorationChange import org.readium.navigator.common.DecorationListener -import org.readium.navigator.common.Progression import org.readium.navigator.common.TapEvent import org.readium.navigator.common.changesByHref import org.readium.navigator.web.common.WebDecorationTemplate @@ -67,7 +66,6 @@ import org.readium.navigator.web.reflowable.ReflowableWebDecoration import org.readium.navigator.web.reflowable.ReflowableWebDecorationCssSelectorLocation import org.readium.navigator.web.reflowable.ReflowableWebDecorationLocation import org.readium.navigator.web.reflowable.ReflowableWebDecorationTextQuoteLocation -import org.readium.navigator.web.reflowable.ReflowableWebGoLocation import org.readium.navigator.web.reflowable.css.ReadiumCssInjector import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.AbsoluteUrl @@ -78,7 +76,6 @@ import timber.log.Timber @Composable internal fun ReflowableResource( resourceState: ReflowableResourceState, - pendingLocation: ReflowableWebGoLocation?, publicationBaseUrl: AbsoluteUrl, webViewClient: WebViewClient, backgroundColor: Color, @@ -94,9 +91,8 @@ internal fun ReflowableResource( onTap: (TapEvent) -> Unit, onLinkActivated: (Url, String) -> Unit, onDecorationActivated: (DecorationListener.OnActivatedEvent) -> Unit, - onProgressionChange: (Progression) -> Unit, + onProgressionChange: () -> Unit, onDocumentResized: () -> Unit, - onPendingLocationConsumed: (ReflowableWebGoLocation) -> Unit, ) { Box( modifier = Modifier.fillMaxSize(), @@ -183,24 +179,46 @@ internal fun ReflowableResource( Timber.d("resource ${resourceState.index} onDocumentLoadedAndResized") webView.invokeOnWebViewUpToDate { val scrollController = WebViewScrollController(webView) - scrollController.moveToProgression( - progression = resourceState.startProgression.value, - snap = !scroll, - orientation = orientation, - direction = layoutDirection - ) resourceState.scrollController.value = scrollController - resourceState.updateProgression( - startProgression = resourceState.startProgression, - orientation = orientation, - direction = layoutDirection - ) Timber.d("resource ${resourceState.index} ready to scroll") + + when (val pending = resourceState.pendingLocation) { + is ReflowableResourceLocation.HtmlId -> { + // Wait for the MoveApi + } + is ReflowableResourceLocation.Progression -> { + Timber.d("going to progression ${pending.value}") + scrollController.moveToProgression( + progression = pending.value.value, + snap = !scroll, + orientation = orientation, + direction = layoutDirection + ) + resourceState.updateProgression( + orientation = orientation, + direction = layoutDirection + ) + resourceState.acknowledgePendingLocation(pending) + } + null -> { + Timber.d("going to start") + scrollController.moveToProgression( + progression = resourceState.progressionRange!!.start.value, + snap = !scroll, + orientation = orientation, + direction = layoutDirection + ) + + resourceState.updateProgression( + orientation = orientation, + direction = layoutDirection + ) + } + } + webView.setOnScrollChangeListener { view, scrollX, scrollY, oldScrollX, oldScrollY -> - scrollController.startProgression( - orientation, - layoutDirection - )?.let { onProgressionChange(Progression(it)!!) } + resourceState.updateProgression(orientation, layoutDirection) + onProgressionChange() } showPlaceholder.value = false } @@ -208,7 +226,6 @@ internal fun ReflowableResource( onDocumentResizedDelegate = { Timber.d("resource ${resourceState.index} onDocumentResized") resourceState.updateProgression( - startProgression = resourceState.startProgression, orientation = orientation, direction = layoutDirection ) @@ -221,25 +238,45 @@ internal fun ReflowableResource( val density = LocalDensity.current - LaunchedEffect(moveApi, pendingLocation, resourceState.scrollController.value) { + LaunchedEffect(moveApi, resourceState.scrollController.value) { moveApi?.let { moveApi -> - pendingLocation?.let { - resourceState.scrollController.value?.let { scrollController -> - val offset = moveApi.getOffsetForLocation( - progression = pendingLocation.progression, - htmlId = pendingLocation.htmlId, - orientation = orientation - ) + resourceState.scrollController.value?.let { scrollController -> + snapshotFlow { + resourceState.pendingLocation + }.onEach { pendingLocation -> + pendingLocation?.let { + when (pendingLocation) { + is ReflowableResourceLocation.HtmlId -> { + val offset = moveApi.getOffsetForLocation( + progression = null, + htmlId = pendingLocation.value, + orientation = orientation + ) - offset?.let { offset -> - scrollController.moveToOffset( - offset = with(density) { offset.dp.roundToPx() }, - snap = !scroll, - orientation = orientation, - ) + offset?.let { offset -> + Timber.d("going to id ${pendingLocation.value}") + scrollController.moveToOffset( + offset = with(density) { offset.dp.roundToPx() }, + snap = !scroll, + orientation = orientation, + ) + } + } + + is ReflowableResourceLocation.Progression -> { + Timber.d("going to progression ${pendingLocation.value}") + scrollController.moveToProgression( + progression = pendingLocation.value.value, + snap = !scroll, + orientation = orientation, + direction = layoutDirection + ) + } + } + resourceState.updateProgression(orientation, layoutDirection) + resourceState.acknowledgePendingLocation(pendingLocation) } - onPendingLocationConsumed(pendingLocation) - } + }.launchIn(this) } } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt index e937ce7bdf..8d38d79e4f 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt @@ -11,48 +11,90 @@ package org.readium.navigator.web.reflowable.resource import androidx.compose.foundation.gestures.Orientation import androidx.compose.runtime.MutableState import androidx.compose.runtime.Stable +import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue import androidx.compose.ui.unit.LayoutDirection +import kotlin.coroutines.Continuation +import kotlin.coroutines.resume import org.readium.navigator.common.Progression import org.readium.navigator.web.internals.pager.PageScrollState import org.readium.navigator.web.internals.webview.WebViewScrollController import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.Url +import timber.log.Timber @Stable internal class ReflowableResourceState( val index: Int, val href: Url, - initialProgression: Progression, + initialLocation: ReflowableResourceLocation, ) : PageScrollState { - var startProgression: Progression = initialProgression - private set + private var pendingGoMutable by mutableStateOf(PendingGo(initialLocation)) + private var lastComputedProgressionRange: ClosedRange? = null + val pendingLocation: ReflowableResourceLocation? get() = + pendingGoMutable?.location + val progressionRange: ClosedRange? get() = lastComputedProgressionRange - fun updateProgression( - startProgression: Progression, - orientation: Orientation, - direction: LayoutDirection, - ) { - this.startProgression = startProgression - updateProgressionRange(startProgression, orientation, direction) + fun go(location: ReflowableResourceLocation, continuation: Continuation?) { + pendingGoMutable = PendingGo(location, continuation) } - private fun updateProgressionRange( - start: Progression, + fun acknowledgePendingLocation(location: ReflowableResourceLocation) { + val pendingGoNow = pendingGoMutable + if (location != pendingGoNow?.location) { + return + } + pendingGoMutable = null + pendingGoNow.continuation?.resume(Unit) + } + + fun updateProgression( orientation: Orientation, direction: LayoutDirection, ) { - val end = scrollController.value?.endProgression( + val scrollController = scrollController.value ?: return + + // Do not trust computed progressions to be between 0 and 1. + // Sometimes scrollX is far higher than maxScrollX. + + val startProgression = scrollController.startProgression( orientation = orientation, direction = direction )?.let { Progression(it) } - end?.let { lastComputedProgressionRange = start..end } + ?: return + + val endProgression = scrollController.endProgression( + orientation = orientation, + direction = direction + )?.let { Progression(it) } ?: return + + Timber.d("updateProgression $startProgression $endProgression") + + lastComputedProgressionRange = startProgression..endProgression } - override val scrollController: MutableState = mutableStateOf(null) + override val scrollController: MutableState = + mutableStateOf(null) } + +internal sealed interface ReflowableResourceLocation { + + data class Progression( + val value: org.readium.navigator.common.Progression, + ) : ReflowableResourceLocation + + data class HtmlId( + val value: org.readium.navigator.common.HtmlId, + ) : ReflowableResourceLocation +} + +internal data class PendingGo( + val location: ReflowableResourceLocation, + val continuation: Continuation? = null, +) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt index 5d0183af19..d901d06af5 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt @@ -3,6 +3,7 @@ package org.readium.navigator.web.reflowable.resource import org.readium.navigator.common.Position import org.readium.navigator.common.Progression import org.readium.r2.shared.ExperimentalReadiumApi +import org.readium.r2.shared.util.Url /** Information about the visible portion of the publication. */ @ExperimentalReadiumApi @@ -11,12 +12,12 @@ public data class ReflowableWebViewport( /** * Range of visible reading order resources. */ - public val readingOrder: ClosedRange, + public val readingOrder: List, /** * Range of visible scroll progressions for each visible reading order resource. */ - public val progressions: List>, + public val progressions: Map>, /** * Range of visible positions. From 5046ffe506f9025d81db8995c1dfb58949ba093a Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Sun, 7 Dec 2025 17:17:02 +0100 Subject: [PATCH 14/56] Fix various bugs --- .../web/reflowable/ReflowableWebRendition.kt | 3 +- .../reflowable/ReflowableWebRenditionState.kt | 2 +- .../reflowable/resource/ReflowableResource.kt | 25 ++++++++-------- .../resource/ReflowableResourceState.kt | 30 +++++++++++++++---- 4 files changed, 40 insertions(+), 20 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index 707fed41c2..be903ce999 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -183,11 +183,12 @@ public fun ReflowableWebRendition( onDecorationActivated = { event -> decorationListener.onDecorationActivated(event) }, - onProgressionChange = { + onLocationChange = { state.updateLocation() }, onDocumentResized = { state.scrollState.onDocumentResized(index) + state.updateLocation() } ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 0f9ddf1e3d..18d1a8427e 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -89,6 +89,7 @@ public class ReflowableWebRenditionState internal constructor( configuration: ReflowableWebConfiguration, disableSelection: Boolean, ) : RenditionState { + private val controllerState: MutableState = mutableStateOf(null) @@ -105,7 +106,6 @@ public class ReflowableWebRenditionState internal constructor( internal val resourceStates: List = initialLocation.toResourceLocations(initialResourceIndex, publication.readingOrder) - .also { Timber.d("destByResource $it") } .zip(publication.readingOrder.items) .mapIndexed { index, (location, item) -> ReflowableResourceState( diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index d03fd91b62..cd137e2203 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -91,7 +91,7 @@ internal fun ReflowableResource( onTap: (TapEvent) -> Unit, onLinkActivated: (Url, String) -> Unit, onDecorationActivated: (DecorationListener.OnActivatedEvent) -> Unit, - onProgressionChange: () -> Unit, + onLocationChange: () -> Unit, onDocumentResized: () -> Unit, ) { Box( @@ -187,23 +187,22 @@ internal fun ReflowableResource( // Wait for the MoveApi } is ReflowableResourceLocation.Progression -> { - Timber.d("going to progression ${pending.value}") scrollController.moveToProgression( progression = pending.value.value, snap = !scroll, orientation = orientation, direction = layoutDirection ) - resourceState.updateProgression( + resourceState.acknowledgePendingLocation( + location = pending, orientation = orientation, direction = layoutDirection ) - resourceState.acknowledgePendingLocation(pending) + onLocationChange() } null -> { - Timber.d("going to start") scrollController.moveToProgression( - progression = resourceState.progressionRange!!.start.value, + progression = resourceState.currentProgression!!.value, snap = !scroll, orientation = orientation, direction = layoutDirection @@ -213,12 +212,13 @@ internal fun ReflowableResource( orientation = orientation, direction = layoutDirection ) + onLocationChange() } } webView.setOnScrollChangeListener { view, scrollX, scrollY, oldScrollX, oldScrollY -> resourceState.updateProgression(orientation, layoutDirection) - onProgressionChange() + onLocationChange() } showPlaceholder.value = false } @@ -252,9 +252,7 @@ internal fun ReflowableResource( htmlId = pendingLocation.value, orientation = orientation ) - offset?.let { offset -> - Timber.d("going to id ${pendingLocation.value}") scrollController.moveToOffset( offset = with(density) { offset.dp.roundToPx() }, snap = !scroll, @@ -264,7 +262,6 @@ internal fun ReflowableResource( } is ReflowableResourceLocation.Progression -> { - Timber.d("going to progression ${pendingLocation.value}") scrollController.moveToProgression( progression = pendingLocation.value.value, snap = !scroll, @@ -273,8 +270,12 @@ internal fun ReflowableResource( ) } } - resourceState.updateProgression(orientation, layoutDirection) - resourceState.acknowledgePendingLocation(pendingLocation) + resourceState.acknowledgePendingLocation( + location = pendingLocation, + orientation = orientation, + direction = layoutDirection + ) + onLocationChange() } }.launchIn(this) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt index 8d38d79e4f..be49f29e15 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt @@ -41,24 +41,39 @@ internal class ReflowableResourceState( val progressionRange: ClosedRange? get() = lastComputedProgressionRange + /** This progression will be used on resource initialization if there is no pending go. */ + var currentProgression: Progression? = + (initialLocation as? ReflowableResourceLocation.Progression)?.value ?: Progression(0.0)!! + fun go(location: ReflowableResourceLocation, continuation: Continuation?) { pendingGoMutable = PendingGo(location, continuation) } - fun acknowledgePendingLocation(location: ReflowableResourceLocation) { + fun acknowledgePendingLocation( + location: ReflowableResourceLocation, + orientation: Orientation, + direction: LayoutDirection, + ) { val pendingGoNow = pendingGoMutable if (location != pendingGoNow?.location) { return } - pendingGoMutable = null + pendingGoMutable = if (updateProgression(orientation, direction)) { + null + } else { + pendingGoNow.copy(continuation = null) + } + + // Resume the call even in case of failed progression update because it's not + // clear when the progression will be updated again. pendingGoNow.continuation?.resume(Unit) } fun updateProgression( orientation: Orientation, direction: LayoutDirection, - ) { - val scrollController = scrollController.value ?: return + ): Boolean { + val scrollController = scrollController.value ?: return false // Do not trust computed progressions to be between 0 and 1. // Sometimes scrollX is far higher than maxScrollX. @@ -67,16 +82,19 @@ internal class ReflowableResourceState( orientation = orientation, direction = direction )?.let { Progression(it) } - ?: return + ?: return false val endProgression = scrollController.endProgression( orientation = orientation, direction = direction - )?.let { Progression(it) } ?: return + )?.let { Progression(it) } ?: return false Timber.d("updateProgression $startProgression $endProgression") lastComputedProgressionRange = startProgression..endProgression + currentProgression = startProgression + + return true } override val scrollController: MutableState = From bb84f961caf1a6f946f46a7cb06640aca76daef4 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Sun, 14 Dec 2025 16:18:46 +0100 Subject: [PATCH 15/56] Don't turn page on tap when there is a selection ongoing --- .../src/main/assets/_scripts/src/gestures.js | 8 +++ .../assets/readium/scripts/readium-fixed.js | 2 +- .../readium/scripts/readium-reflowable.js | 2 +- .../scripts/src/bridge/all-listener-bridge.ts | 25 ++++++- .../reflowable-initialization-bridge.ts | 9 ++- .../internals/scripts/src/common/gestures.ts | 8 --- .../internals/scripts/src/common/selection.ts | 22 ++++++ .../src/index-reflowable-injectable.ts | 6 +- .../generated/fixed-double-script.js | 2 +- .../generated/fixed-double-script.js.map | 2 +- .../generated/fixed-injectable-script.js | 2 +- .../generated/fixed-injectable-script.js.map | 2 +- .../generated/fixed-single-script.js | 2 +- .../generated/fixed-single-script.js.map | 2 +- .../generated/reflowable-injectable-script.js | 2 +- .../reflowable-injectable-script.js.map | 2 +- .../internals/webapi/SelectionListenerApi.kt | 53 +++++++++++++++ .../web/internals/webview/RelaxedWebView.kt | 59 +++++++++++++--- .../web/reflowable/ReflowableWebRendition.kt | 2 +- .../reflowable/resource/ReflowableResource.kt | 68 ++++++++++++------- 20 files changed, 222 insertions(+), 58 deletions(-) create mode 100644 readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt diff --git a/readium/navigator/src/main/assets/_scripts/src/gestures.js b/readium/navigator/src/main/assets/_scripts/src/gestures.js index 9bee231b02..9ce99cf1c9 100644 --- a/readium/navigator/src/main/assets/_scripts/src/gestures.js +++ b/readium/navigator/src/main/assets/_scripts/src/gestures.js @@ -13,11 +13,19 @@ window.addEventListener("DOMContentLoaded", function () { }); function onClick(event) { + console.log( + `selectionType ${window.getSelection().type} isCollapsed ${ + window.getSelection().isCollapsed + }` + ); + if (!window.getSelection().isCollapsed) { // There's an on-going selection, the tap will dismiss it so we don't forward it. return; } + console.log("Reporting tap"); + var pixelRatio = window.devicePixelRatio; let clickEvent = { defaultPrevented: event.defaultPrevented, diff --git a/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js b/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js index 924d40b71d..80637a9c36 100644 --- a/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js +++ b/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js @@ -1,2 +1,2 @@ -!function(){var u={1844:function(u,t){"use strict";function e(u){return u.split("").reverse().join("")}function r(u){return(u|-u)>>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E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\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC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D87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717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3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\u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D87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA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\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5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EC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990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u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB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\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[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-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\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\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7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DC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uD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uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0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DFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7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uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA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u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\u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|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAA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C40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\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\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\u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\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55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uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\u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DFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0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\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e void } -export class ReflowableListenerAdapter implements GesturesListener { +export class ReflowableListenerAdapter + implements GesturesListener, SelectionListener +{ readonly gesturesBridge: GesturesBridge + readonly selectionListenerBridge: SelectionListenerBridge - constructor(gesturesBridge: GesturesBridge) { + constructor( + gesturesBridge: GesturesBridge, + selectionListenerBridge: SelectionListenerBridge + ) { this.gesturesBridge = gesturesBridge + this.selectionListenerBridge = selectionListenerBridge } onTap(event: MouseEvent) { @@ -56,6 +69,14 @@ export class ReflowableListenerAdapter implements GesturesListener { stringOffset ) } + + onSelectionStart(): void { + this.selectionListenerBridge.onSelectionStart() + } + + onSelectionEnd(): void { + this.selectionListenerBridge.onSelectionEnd() + } } export class FixedListenerAdapter implements AreaManager.Listener { diff --git a/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts index 50e27f6783..8c81806a5d 100644 --- a/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts +++ b/readium/navigators/web/internals/scripts/src/bridge/reflowable-initialization-bridge.ts @@ -1,6 +1,6 @@ import { DecorationManager } from "../common/decoration" import { GesturesDetector } from "../common/gestures" -import { SelectionManager } from "../common/selection" +import { SelectionManager, SelectionReporter } from "../common/selection" import { ReflowableDecorationsBridge } from "./all-decoration-bridge" import { ReflowableListenerAdapter } from "./all-listener-bridge" import { ReflowableSelectionBridge } from "./all-selection-bridge" @@ -24,7 +24,10 @@ export class ReflowableInitializationBridge { this.window.move = new ReflowableMoveBridge(this.window.document) this.listener.onMoveApiAvailable() - const bridgeListener = new ReflowableListenerAdapter(window.gestures) + const bridgeListener = new ReflowableListenerAdapter( + window.gestures, + window.selectionListener + ) const decorationManager = new DecorationManager(window) @@ -44,6 +47,8 @@ export class ReflowableInitializationBridge { this.listener.onDecorationApiAvailable() new GesturesDetector(window, bridgeListener, decorationManager) + + new SelectionReporter(window, bridgeListener) } // Setups the `viewport` meta tag to disable overview. diff --git a/readium/navigators/web/internals/scripts/src/common/gestures.ts b/readium/navigators/web/internals/scripts/src/common/gestures.ts index 278cd15c28..7ebd59c7fb 100644 --- a/readium/navigators/web/internals/scripts/src/common/gestures.ts +++ b/readium/navigators/web/internals/scripts/src/common/gestures.ts @@ -36,14 +36,6 @@ export class GesturesDetector { return } - const selection = this.window.getSelection() - if (selection && selection.type == "Range") { - // There's an on-going selection, the tap will dismiss it so we don't forward it. - // selection.type might be None (collapsed) or Caret with a collapsed range - // when there is not true selection. - return - } - let nearestElement: Element | null if (event.target instanceof HTMLElement) { nearestElement = this.nearestInteractiveElement(event.target) diff --git a/readium/navigators/web/internals/scripts/src/common/selection.ts b/readium/navigators/web/internals/scripts/src/common/selection.ts index 3bbecc7565..9a44b45c1f 100644 --- a/readium/navigators/web/internals/scripts/src/common/selection.ts +++ b/readium/navigators/web/internals/scripts/src/common/selection.ts @@ -19,6 +19,28 @@ export interface SelectionListener { onSelectionEnd(): void } +export class SelectionReporter { + private isSelecting = false + + constructor(window: Window, listener: SelectionListener) { + document.addEventListener( + "selectionchange", + // eslint-disable-next-line @typescript-eslint/no-unused-vars + (event) => { + const collapsed = window.getSelection()?.isCollapsed + if (collapsed && this.isSelecting) { + this.isSelecting = false + listener.onSelectionEnd() + } else if (!collapsed && !this.isSelecting) { + this.isSelecting = true + listener.onSelectionStart() + } + }, + false + ) + } +} + export interface Selection { selectedText: string textBefore: string diff --git a/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts b/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts index 23303e6612..0d57c82acf 100644 --- a/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts +++ b/readium/navigators/web/internals/scripts/src/index-reflowable-injectable.ts @@ -9,7 +9,10 @@ */ import { ReflowableDecorationsBridge } from "./bridge/all-decoration-bridge" -import { GesturesBridge } from "./bridge/all-listener-bridge" +import { + GesturesBridge, + SelectionListenerBridge, +} from "./bridge/all-listener-bridge" import { DocumentStateBridge } from "./bridge/all-listener-bridge" import { ReflowableSelectionBridge } from "./bridge/all-selection-bridge" import { CssBridge } from "./bridge/reflowable-css-bridge" @@ -31,6 +34,7 @@ declare global { // Native APIs available for web code documentState: DocumentStateBridge gestures: GesturesBridge + selectionListener: SelectionListenerBridge } } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js index 79e6561d0c..7b8fdf381f 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js @@ -1,2 +1,2 @@ -!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=P(t,0,1),r=P(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],x(r,A([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(d[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,A=RegExp.prototype.test,x=Array.prototype.concat,j=Array.prototype.join,P=Array.prototype.slice,O=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||A.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-O(-t):O(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var C=r(7002),W=C.custom,B=_(W)?W:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==q(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==q(t)||D&&"object"==typeof t&&D in t)}function _(t){if(M)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(G(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?k(e,w):w}if("bigint"==typeof e){var A=String(e)+"n";return g?k(e,A):A}var O=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=O&&O>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var I,W=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function z(e,r,i){if(r&&(o=P.call(o)).push(r),i){var a={depth:s.depth};return G(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,z);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=M?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||M?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(U(e)){if(0===e.length)return"[]";var it=Z(e,z);return W&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,W)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,z);return"cause"in Error.prototype||!("cause"in e)||T.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(x.call("[cause]: "+z(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(B&&"function"==typeof e[B]&&C)return C(e,{depth:O-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(z(r,e,!0)+" => "+z(t,e))})),Y("Map",i.call(e),st,W)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(z(t,e))})),Y("Set",c.call(e),ut,W)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(z(E.call(e)));if(function(t){return!("[object Boolean]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(String(e)));if(!function(t){return!("[object Date]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,z),lt=F?F(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(q(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(x.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":W?yt+"{"+Q(ct,W)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function q(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=U(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(d,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof v&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return u(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return b.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}function e(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function n(t,r){const n={x:t.left,y:t.top},o={x:t.right,y:t.bottom},i=e(n,r),a=e(o,r);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class o{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;const e=this.window.getSelection();if(e&&"Range"==e.type)return;let r,n;if(r=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,r){if(!(r instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(r.href,r.outerHTML),t.stopPropagation(),t.preventDefault()}n=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,n?this.listener.onDecorationActivated(n):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(r,o,a,s,u){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.listener=u,new i(r,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};u.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}});const c={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=o.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=o.getBoundingClientRect(),i=e(t.offset,r),a=n(t.rect,r),s={id:t.id,group:t.group,rect:a,offset:i};u.onDecorationActivated(s)}},l={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=a.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=a.getBoundingClientRect(),o=e(t.offset,r),i=n(t.rect,r),s={id:t.id,group:t.group,rect:i,offset:o};u.onDecorationActivated(s)}};this.leftPage=new t(r,o,c),this.rightPage=new t(r,a,l),this.metaViewport=s}setLeftMessagePort(t){this.leftPage.setMessagePort(t)}setRightMessagePort(t){this.rightPage.setMessagePort(t)}loadSpread(t){this.leftPage.hide(),this.rightPage.hide(),this.spread=t,t.left&&this.leftPage.loadPage(t.left),t.right&&this.rightPage.loadPage(t.right)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}layout(){if(!this.viewport||!this.leftPage.size&&this.spread.left||!this.rightPage.size&&this.spread.right)return;const t={top:this.insets.top,right:0,bottom:this.insets.bottom,left:this.insets.left};this.leftPage.setMargins(t);const e={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:0};this.rightPage.setMargins(e),this.spread.right?this.spread.left||this.leftPage.setPlaceholder(this.rightPage.size):this.rightPage.setPlaceholder(this.leftPage.size);const r=this.leftPage.size.width+this.rightPage.size.width,n=Math.max(this.leftPage.size.height,this.rightPage.size.height),i={width:r,height:n},a={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},s=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,i,a);this.metaViewport.content=(new o).setInitialScale(s).setMinimumScale(s).setWidth(r).setHeight(n).build(),this.leftPage.show(),this.rightPage.show(),this.listener.onLayout()}}class s{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);function f(t,e){const r=e.getBoundingClientRect(),o=n(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:o,textBefore:t.textBefore,textAfter:t.textAfter}}r.n(l)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}class y{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const h=document.getElementById("page-left"),g=document.getElementById("page-right"),d=document.querySelector("meta[name=viewport]");Window.prototype.doubleArea=new class{constructor(t,e,r,n,o,i){const u=new s(t,o,i);this.manager=new a(t,e,r,n,u)}setLeftMessagePort(t){this.manager.setLeftMessagePort(t)}setRightMessagePort(t){this.manager.setRightMessagePort(t)}loadSpread(t){this.manager.loadSpread(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,h,g,d,window.gestures,window.documentState),window.doubleSelection=new class{constructor(t,e,r){this.requestStates=new Map,this.isLeftInitialized=!1,this.isRightInitialized=!1,this.leftIframe=t,this.rightIframe=e,this.listener=r;const n={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.leftIframe);this.onSelectionAvailable(t,"left",r)}else this.onSelectionAvailable(t,"left",e)}};this.leftWrapper=new p(n);const o={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.rightIframe);this.onSelectionAvailable(t,"right",r)}else this.onSelectionAvailable(t,"right",e)}};this.rightWrapper=new p(o)}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t),this.isLeftInitialized=!0}setRightMessagePort(t){this.rightWrapper.setMessagePort(t),this.isRightInitialized=!0}requestSelection(t){this.isLeftInitialized&&this.isRightInitialized?(this.requestStates.set(t,"pending"),this.leftWrapper.requestSelection(t),this.rightWrapper.requestSelection(t)):this.isLeftInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.leftWrapper.requestSelection(t)):this.isRightInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.rightWrapper.requestSelection(t)):(this.requestStates.set(t,"firstResponseWasNull"),this.onSelectionAvailable(t,"left",null))}clearSelection(){this.leftWrapper.clearSelection(),this.rightWrapper.clearSelection()}onSelectionAvailable(t,e,r){const n=this.requestStates.get(t);if(!n)return;if(!r&&"pending"===n)return void this.requestStates.set(t,"firstResponseWasNull");this.requestStates.delete(t);const o=JSON.stringify(r);this.listener.onSelectionAvailable(t,e,o)}}(h,g,window.doubleSelectionListener),window.doubleDecorations=new class{constructor(){this.leftWrapper=new y,this.rightWrapper=new y}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t)}setRightMessagePort(t){this.rightWrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.leftWrapper.registerTemplates(e),this.rightWrapper.registerTemplates(e)}addDecoration(t,e,r){const n=function(t){return JSON.parse(t)}(t);switch(e){case"left":this.leftWrapper.addDecoration(n,r);break;case"right":this.rightWrapper.addDecoration(n,r);break;default:throw Error(`Unknown iframe type: ${e}`)}}removeDecoration(t,e){this.leftWrapper.removeDecoration(t,e),this.rightWrapper.removeDecoration(t,e)}},window.doubleInitialization=new class{constructor(t,e,r,n,o,i,a){this.areaReadySemaphore=2,this.selectionReadySemaphore=2,this.decorationReadySemaphore=2,this.listener=e,this.areaBridge=o,this.selectionBridge=i,this.decorationsBridge=a,t.addEventListener("message",(t=>{t.ports[0]&&(t.source===r.contentWindow?this.onInitMessageLeft(t):t.source==n.contentWindow&&this.onInitMessageRight(t))}))}loadSpread(t){const e=(t.left?1:0)+(t.right?1:0);this.areaReadySemaphore=e,this.selectionReadySemaphore=e,this.decorationReadySemaphore=e,this.areaBridge.loadSpread(t)}onInitMessageLeft(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setLeftMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setLeftMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setLeftMessagePort(r),this.onInitDecorationMessage()}}onInitMessageRight(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setRightMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setRightMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setRightMessagePort(r),this.onInitDecorationMessage()}}onInitAreaMessage(){this.areaReadySemaphore-=1,0==this.areaReadySemaphore&&this.listener.onAreaApiAvailable()}onInitSelectionMessage(){this.selectionReadySemaphore-=1,0==this.selectionReadySemaphore&&this.listener.onSelectionApiAvailable()}onInitDecorationMessage(){this.decorationReadySemaphore-=1,0==this.decorationReadySemaphore&&this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,h,g,window.doubleArea,window.doubleSelection,window.doubleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); +!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=P(t,0,1),r=P(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],x(r,A([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(d[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,A=RegExp.prototype.test,x=Array.prototype.concat,j=Array.prototype.join,P=Array.prototype.slice,O=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||A.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-O(-t):O(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var C=r(7002),W=C.custom,B=_(W)?W:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==q(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==q(t)||D&&"object"==typeof t&&D in t)}function _(t){if(M)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(G(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?k(e,w):w}if("bigint"==typeof e){var A=String(e)+"n";return g?k(e,A):A}var O=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=O&&O>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var I,W=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function z(e,r,i){if(r&&(o=P.call(o)).push(r),i){var a={depth:s.depth};return G(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,z);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=M?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||M?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(U(e)){if(0===e.length)return"[]";var it=Z(e,z);return W&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,W)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,z);return"cause"in Error.prototype||!("cause"in e)||T.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(x.call("[cause]: "+z(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(B&&"function"==typeof e[B]&&C)return C(e,{depth:O-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(z(r,e,!0)+" => "+z(t,e))})),Y("Map",i.call(e),st,W)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(z(t,e))})),Y("Set",c.call(e),ut,W)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(z(E.call(e)));if(function(t){return!("[object Boolean]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(String(e)));if(!function(t){return!("[object Date]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,z),lt=F?F(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(q(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(x.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":W?yt+"{"+Q(ct,W)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function q(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=U(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(d,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof v&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return u(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return b.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}function e(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function n(t,r){const n={x:t.left,y:t.top},o={x:t.right,y:t.bottom},i=e(n,r),a=e(o,r);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class o{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(r,o,a,s,u){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.listener=u,new i(r,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};u.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}});const c={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=o.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=o.getBoundingClientRect(),i=e(t.offset,r),a=n(t.rect,r),s={id:t.id,group:t.group,rect:a,offset:i};u.onDecorationActivated(s)}},l={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=a.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=a.getBoundingClientRect(),o=e(t.offset,r),i=n(t.rect,r),s={id:t.id,group:t.group,rect:i,offset:o};u.onDecorationActivated(s)}};this.leftPage=new t(r,o,c),this.rightPage=new t(r,a,l),this.metaViewport=s}setLeftMessagePort(t){this.leftPage.setMessagePort(t)}setRightMessagePort(t){this.rightPage.setMessagePort(t)}loadSpread(t){this.leftPage.hide(),this.rightPage.hide(),this.spread=t,t.left&&this.leftPage.loadPage(t.left),t.right&&this.rightPage.loadPage(t.right)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}layout(){if(!this.viewport||!this.leftPage.size&&this.spread.left||!this.rightPage.size&&this.spread.right)return;const t={top:this.insets.top,right:0,bottom:this.insets.bottom,left:this.insets.left};this.leftPage.setMargins(t);const e={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:0};this.rightPage.setMargins(e),this.spread.right?this.spread.left||this.leftPage.setPlaceholder(this.rightPage.size):this.rightPage.setPlaceholder(this.leftPage.size);const r=this.leftPage.size.width+this.rightPage.size.width,n=Math.max(this.leftPage.size.height,this.rightPage.size.height),i={width:r,height:n},a={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},s=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,i,a);this.metaViewport.content=(new o).setInitialScale(s).setMinimumScale(s).setWidth(r).setHeight(n).build(),this.leftPage.show(),this.rightPage.show(),this.listener.onLayout()}}class s{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);function f(t,e){const r=e.getBoundingClientRect(),o=n(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:o,textBefore:t.textBefore,textAfter:t.textAfter}}r.n(l)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}class y{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const h=document.getElementById("page-left"),g=document.getElementById("page-right"),d=document.querySelector("meta[name=viewport]");Window.prototype.doubleArea=new class{constructor(t,e,r,n,o,i){const u=new s(t,o,i);this.manager=new a(t,e,r,n,u)}setLeftMessagePort(t){this.manager.setLeftMessagePort(t)}setRightMessagePort(t){this.manager.setRightMessagePort(t)}loadSpread(t){this.manager.loadSpread(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,h,g,d,window.gestures,window.documentState),window.doubleSelection=new class{constructor(t,e,r){this.requestStates=new Map,this.isLeftInitialized=!1,this.isRightInitialized=!1,this.leftIframe=t,this.rightIframe=e,this.listener=r;const n={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.leftIframe);this.onSelectionAvailable(t,"left",r)}else this.onSelectionAvailable(t,"left",e)}};this.leftWrapper=new p(n);const o={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.rightIframe);this.onSelectionAvailable(t,"right",r)}else this.onSelectionAvailable(t,"right",e)}};this.rightWrapper=new p(o)}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t),this.isLeftInitialized=!0}setRightMessagePort(t){this.rightWrapper.setMessagePort(t),this.isRightInitialized=!0}requestSelection(t){this.isLeftInitialized&&this.isRightInitialized?(this.requestStates.set(t,"pending"),this.leftWrapper.requestSelection(t),this.rightWrapper.requestSelection(t)):this.isLeftInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.leftWrapper.requestSelection(t)):this.isRightInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.rightWrapper.requestSelection(t)):(this.requestStates.set(t,"firstResponseWasNull"),this.onSelectionAvailable(t,"left",null))}clearSelection(){this.leftWrapper.clearSelection(),this.rightWrapper.clearSelection()}onSelectionAvailable(t,e,r){const n=this.requestStates.get(t);if(!n)return;if(!r&&"pending"===n)return void this.requestStates.set(t,"firstResponseWasNull");this.requestStates.delete(t);const o=JSON.stringify(r);this.listener.onSelectionAvailable(t,e,o)}}(h,g,window.doubleSelectionListener),window.doubleDecorations=new class{constructor(){this.leftWrapper=new y,this.rightWrapper=new y}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t)}setRightMessagePort(t){this.rightWrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.leftWrapper.registerTemplates(e),this.rightWrapper.registerTemplates(e)}addDecoration(t,e,r){const n=function(t){return JSON.parse(t)}(t);switch(e){case"left":this.leftWrapper.addDecoration(n,r);break;case"right":this.rightWrapper.addDecoration(n,r);break;default:throw Error(`Unknown iframe type: ${e}`)}}removeDecoration(t,e){this.leftWrapper.removeDecoration(t,e),this.rightWrapper.removeDecoration(t,e)}},window.doubleInitialization=new class{constructor(t,e,r,n,o,i,a){this.areaReadySemaphore=2,this.selectionReadySemaphore=2,this.decorationReadySemaphore=2,this.listener=e,this.areaBridge=o,this.selectionBridge=i,this.decorationsBridge=a,t.addEventListener("message",(t=>{t.ports[0]&&(t.source===r.contentWindow?this.onInitMessageLeft(t):t.source==n.contentWindow&&this.onInitMessageRight(t))}))}loadSpread(t){const e=(t.left?1:0)+(t.right?1:0);this.areaReadySemaphore=e,this.selectionReadySemaphore=e,this.decorationReadySemaphore=e,this.areaBridge.loadSpread(t)}onInitMessageLeft(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setLeftMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setLeftMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setLeftMessagePort(r),this.onInitDecorationMessage()}}onInitMessageRight(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setRightMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setRightMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setRightMessagePort(r),this.onInitDecorationMessage()}}onInitAreaMessage(){this.areaReadySemaphore-=1,0==this.areaReadySemaphore&&this.listener.onAreaApiAvailable()}onInitSelectionMessage(){this.selectionReadySemaphore-=1,0==this.selectionReadySemaphore&&this.listener.onSelectionApiAvailable()}onInitDecorationMessage(){this.decorationReadySemaphore-=1,0==this.decorationReadySemaphore&&this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,h,g,window.doubleArea,window.doubleSelection,window.doubleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); //# sourceMappingURL=fixed-double-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map index 590868cc5d..c775a54a24 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-double-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAK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CACA,iBAAAmG,CAAkB/K,GACd,MAAMkL,EAAclL,EAAMC,KACpBrB,EAAcoB,EAAM8K,MAAM,GAChC,OAAQI,GACJ,IAAK,kBACDttB,KAAK4sB,WAAW/F,mBAAmB7F,GACnChhB,KAAKutB,oBACL,MACJ,IAAK,gBACDvtB,KAAK6sB,gBAAgBhG,mBAAmB7F,GACxChhB,KAAKwtB,yBACL,MACJ,IAAK,kBACDxtB,KAAK8sB,kBAAkBjG,mBAAmB7F,GAC1ChhB,KAAKytB,0BAGjB,CACA,kBAAAL,CAAmBhL,GACf,MAAMkL,EAAclL,EAAMC,KACpBrB,EAAcoB,EAAM8K,MAAM,GAChC,OAAQI,GACJ,IAAK,kBACDttB,KAAK4sB,WAAW9F,oBAAoB9F,GACpChhB,KAAKutB,oBACL,MACJ,IAAK,gBACDvtB,KAAK6sB,gBAAgB/F,oBAAoB9F,GACzChhB,KAAKwtB,yBACL,MACJ,IAAK,kBACDxtB,KAAK8sB,kBAAkBhG,oBAAoB9F,GAC3ChhB,KAAKytB,0BAGjB,CACA,iBAAAF,GACIvtB,KAAK+sB,oBAAsB,EACI,GAA3B/sB,KAAK+sB,oBACL/sB,KAAKwgB,SAASkN,oBAEtB,CACA,sBAAAF,GACIxtB,KAAKgtB,yBAA2B,EACI,GAAhChtB,KAAKgtB,yBACLhtB,KAAKwgB,SAASmN,yBAEtB,CACA,uBAAAF,GACIztB,KAAKitB,0BAA4B,EACI,GAAjCjtB,KAAKitB,0BACLjtB,KAAKwgB,SAASoN,0BAEtB,GJpH8Dha,OAAQA,OAAOia,cAAepI,EAAYC,EAAa9R,OAAOgX,WAAYhX,OAAO4X,gBAAiB5X,OAAOyY,mBAC3KzY,OAAOia,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/double-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/index-fixed-double.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n const selection = this.window.getSelection();\n if (selection && selection.type == \"Range\") {\n // There's an on-going selection, the tap will dismiss it so we don't forward it.\n // selection.type might be None (collapsed) or Caret with a collapsed range\n // when there is not true selection.\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class DoubleAreaManager {\n constructor(window, leftIframe, rightIframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n const leftPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n const rightPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.leftPage = new PageManager(window, leftIframe, leftPageListener);\n this.rightPage = new PageManager(window, rightIframe, rightPageListener);\n this.metaViewport = metaViewport;\n }\n setLeftMessagePort(messagePort) {\n this.leftPage.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightPage.setMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.leftPage.hide();\n this.rightPage.hide();\n this.spread = spread;\n if (spread.left) {\n this.leftPage.loadPage(spread.left);\n }\n if (spread.right) {\n this.rightPage.loadPage(spread.right);\n }\n }\n setViewport(size, insets) {\n if (this.viewport == size && this.insets == insets) {\n return;\n }\n this.viewport = size;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n layout() {\n if (!this.viewport ||\n (!this.leftPage.size && this.spread.left) ||\n (!this.rightPage.size && this.spread.right)) {\n return;\n }\n const leftMargins = {\n top: this.insets.top,\n right: 0,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.leftPage.setMargins(leftMargins);\n const rightMargins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: 0,\n };\n this.rightPage.setMargins(rightMargins);\n if (!this.spread.right) {\n this.rightPage.setPlaceholder(this.leftPage.size);\n }\n else if (!this.spread.left) {\n this.leftPage.setPlaceholder(this.rightPage.size);\n }\n const contentWidth = this.leftPage.size.width + this.rightPage.size.width;\n const contentHeight = Math.max(this.leftPage.size.height, this.rightPage.size.height);\n const contentSize = { width: contentWidth, height: contentHeight };\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, contentSize, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(contentWidth)\n .setHeight(contentHeight)\n .build();\n this.leftPage.show();\n this.rightPage.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge) {\n this.gesturesBridge = gesturesBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedDoubleAreaBridge as FixedDoubleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedDoubleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedDoubleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedDoubleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst leftIframe = document.getElementById(\"page-left\");\nconst rightIframe = document.getElementById(\"page-right\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nWindow.prototype.doubleArea = new FixedDoubleAreaBridge(window, leftIframe, rightIframe, metaViewport, window.gestures, window.documentState);\nwindow.doubleSelection = new FixedDoubleSelectionBridge(leftIframe, rightIframe, window.doubleSelectionListener);\nwindow.doubleDecorations = new FixedDoubleDecorationsBridge();\nwindow.doubleInitialization = new FixedDoubleInitializationBridge(window, window.fixedApiState, leftIframe, rightIframe, window.doubleArea, window.doubleSelection, window.doubleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","event","data","kind","onContentSizeAvailable","onTap","onLinkActivated","onDecorationActivated","URL","href","outerHtml","_a","onIframeLoaded","offsetToParentCoordinates","offset","iframeRect","visualViewport","offsetLeft","scale","offsetTop","rectToParentCoordinates","rect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","ViewportStringBuilder","setInitialScale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","selection","getSelection","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","DoubleAreaManager","leftIframe","rightIframe","metaViewport","fit","insets","clientX","clientY","leftPageListener","layout","gestureEvent","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","id","group","rightPageListener","leftPage","rightPage","setLeftMessagePort","setRightMessagePort","loadSpread","spread","setViewport","viewport","setFit","leftMargins","rightMargins","contentWidth","contentHeight","contentSize","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","onLayout","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","stringify","stringOffset","stringRect","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","TrimDirection","ResolveDirection","selectionToParentCoordinates","selectionRect","selectedText","textBefore","textAfter","selectionListener","onFeedback","requestSelection","requestId","send","clearSelection","feedback","onSelectionAvailable","postMessage","registerTemplates","templates","addDecoration","decoration","removeDecoration","getElementById","querySelector","Window","doubleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","doubleSelection","requestStates","isLeftInitialized","isRightInitialized","leftWrapperListener","resolvedSelection","leftWrapper","rightWrapperListener","rightWrapper","requestState","delete","selectionAsJson","doubleSelectionListener","doubleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","doubleInitialization","areaBridge","selectionBridge","decorationsBridge","areaReadySemaphore","selectionReadySemaphore","decorationReadySemaphore","ports","onInitMessageLeft","onInitMessageRight","pageNb","initMessage","onInitAreaMessage","onInitSelectionMessage","onInitDecorationMessage","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-double-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAKF,EAAOD,GAE1EI,EAAQb,EAAa,qCAAqC,GAC1Dc,EAAkBd,EAAa,2BAA2B,GAC1De,EAAOf,EAAa,cAExB,GAAIc,EACH,IACCA,EAAgB,CAAC,EAAG,IAAK,CAAEE,MAAO,GACnC,CAAE,MAAOC,GAERH,EAAkB,IACnB,CAGDX,EAAOC,QAAU,SAAkBc,GAClC,IAAIC,EAAOR,EAAcH,EAAME,EAAOU,WAYtC,OAXIP,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AcoB,EAAM6K,MAAM,GAChC,OAAQI,GACJ,IAAK,kBACDrtB,KAAK2sB,WAAW/F,oBAAoB5F,GACpChhB,KAAKstB,oBACL,MACJ,IAAK,gBACDttB,KAAK4sB,gBAAgBhG,oBAAoB5F,GACzChhB,KAAKutB,yBACL,MACJ,IAAK,kBACDvtB,KAAK6sB,kBAAkBjG,oBAAoB5F,GAC3ChhB,KAAKwtB,0BAGjB,CACA,iBAAAF,GACIttB,KAAK8sB,oBAAsB,EACI,GAA3B9sB,KAAK8sB,oBACL9sB,KAAKwgB,SAASiN,oBAEtB,CACA,sBAAAF,GACIvtB,KAAK+sB,yBAA2B,EACI,GAAhC/sB,KAAK+sB,yBACL/sB,KAAKwgB,SAASkN,yBAEtB,CACA,uBAAAF,GACIxtB,KAAKgtB,0BAA4B,EACI,GAAjChtB,KAAKgtB,0BACLhtB,KAAKwgB,SAASmN,0BAEtB,GJpH8D/Z,OAAQA,OAAOga,cAAerI,EAAYC,EAAa5R,OAAO+W,WAAY/W,OAAO2X,gBAAiB3X,OAAOwY,mBAC3KxY,OAAOga,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/double-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/index-fixed-double.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class DoubleAreaManager {\n constructor(window, leftIframe, rightIframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n const leftPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n const rightPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.leftPage = new PageManager(window, leftIframe, leftPageListener);\n this.rightPage = new PageManager(window, rightIframe, rightPageListener);\n this.metaViewport = metaViewport;\n }\n setLeftMessagePort(messagePort) {\n this.leftPage.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightPage.setMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.leftPage.hide();\n this.rightPage.hide();\n this.spread = spread;\n if (spread.left) {\n this.leftPage.loadPage(spread.left);\n }\n if (spread.right) {\n this.rightPage.loadPage(spread.right);\n }\n }\n setViewport(size, insets) {\n if (this.viewport == size && this.insets == insets) {\n return;\n }\n this.viewport = size;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n layout() {\n if (!this.viewport ||\n (!this.leftPage.size && this.spread.left) ||\n (!this.rightPage.size && this.spread.right)) {\n return;\n }\n const leftMargins = {\n top: this.insets.top,\n right: 0,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.leftPage.setMargins(leftMargins);\n const rightMargins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: 0,\n };\n this.rightPage.setMargins(rightMargins);\n if (!this.spread.right) {\n this.rightPage.setPlaceholder(this.leftPage.size);\n }\n else if (!this.spread.left) {\n this.leftPage.setPlaceholder(this.rightPage.size);\n }\n const contentWidth = this.leftPage.size.width + this.rightPage.size.width;\n const contentHeight = Math.max(this.leftPage.size.height, this.rightPage.size.height);\n const contentSize = { width: contentWidth, height: contentHeight };\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, contentSize, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(contentWidth)\n .setHeight(contentHeight)\n .build();\n this.leftPage.show();\n this.rightPage.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedDoubleAreaBridge as FixedDoubleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedDoubleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedDoubleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedDoubleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst leftIframe = document.getElementById(\"page-left\");\nconst rightIframe = document.getElementById(\"page-right\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nWindow.prototype.doubleArea = new FixedDoubleAreaBridge(window, leftIframe, rightIframe, metaViewport, window.gestures, window.documentState);\nwindow.doubleSelection = new FixedDoubleSelectionBridge(leftIframe, rightIframe, window.doubleSelectionListener);\nwindow.doubleDecorations = new FixedDoubleDecorationsBridge();\nwindow.doubleInitialization = new FixedDoubleInitializationBridge(window, window.fixedApiState, leftIframe, rightIframe, window.doubleArea, window.doubleSelection, window.doubleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","event","data","kind","onContentSizeAvailable","onTap","onLinkActivated","onDecorationActivated","URL","href","outerHtml","_a","onIframeLoaded","offsetToParentCoordinates","offset","iframeRect","visualViewport","offsetLeft","scale","offsetTop","rectToParentCoordinates","rect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","ViewportStringBuilder","setInitialScale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","DoubleAreaManager","leftIframe","rightIframe","metaViewport","fit","insets","clientX","clientY","leftPageListener","layout","gestureEvent","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","id","group","rightPageListener","leftPage","rightPage","setLeftMessagePort","setRightMessagePort","loadSpread","spread","setViewport","viewport","setFit","leftMargins","rightMargins","contentWidth","contentHeight","contentSize","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","onLayout","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","stringify","stringOffset","stringRect","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","TrimDirection","ResolveDirection","selectionToParentCoordinates","selection","selectionRect","selectedText","textBefore","textAfter","selectionListener","onFeedback","requestSelection","requestId","send","clearSelection","feedback","onSelectionAvailable","postMessage","registerTemplates","templates","addDecoration","decoration","removeDecoration","getElementById","querySelector","Window","doubleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","doubleSelection","requestStates","isLeftInitialized","isRightInitialized","leftWrapperListener","resolvedSelection","leftWrapper","rightWrapperListener","rightWrapper","requestState","delete","selectionAsJson","doubleSelectionListener","doubleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","doubleInitialization","areaBridge","selectionBridge","decorationsBridge","areaReadySemaphore","selectionReadySemaphore","decorationReadySemaphore","ports","onInitMessageLeft","onInitMessageRight","pageNb","initMessage","onInitAreaMessage","onInitSelectionMessage","onInitDecorationMessage","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js index d8cef38ae3..a844b9f970 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(b)===y&&(h[g]|=1<0&&w[m]>=r+i;)m-=1;m===a&&w[m]<=r&&(w[m]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var m=c(u,h);u=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(d[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var N=r(7002),F=N.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function W(t){return w.call(String(t),/"/g,""")}function L(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!q(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return g?D(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return g?D(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return L(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:K(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(L(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&N)return N(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return K(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?m.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return G.call(t,e)}function H(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function K(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=L(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,w=p(g,"u")>-1;return n(d,r,m,w)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),w=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof w&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return c(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===g(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return b.set(t,"[[Done]]",!0),c(a,!1)})),o&&(m(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,g,d=r(1844);function b(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,d.Z)(t,e,r)}function m(t,e){return 0===e.length||0===t.length?0:1-b(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(g||(g={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===g.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=b(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?m(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?m(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,d=(c?h:y)/g;function b(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${d}px`;const r=Math.floor(e.top/d)*d;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${d}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/d)*d;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const m=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,m,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,b(t,m,m,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}var C=r(5155);r.n(C)().shim();class T{constructor(t,e){this.decorationManager=e,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"registerTemplates":return this.registerTemplates(t.templates);case"addDecoration":return this.addDecoration(t.decoration,t.group);case"removeDecoration":return this.removeDecoration(t.id,t.group)}}registerTemplates(t){this.decorationManager.registerTemplates(t)}addDecoration(t,e){this.decorationManager.addDecoration(t,e)}removeDecoration(t,e){this.decorationManager.removeDecoration(t,e)}}class I{constructor(t){this.messagePort=t}send(t){this.messagePort.postMessage(t)}}class M{constructor(t,e){this.selectionManager=e,this.messagePort=t,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"requestSelection":return this.onRequestSelection(t.requestId);case"clearSelection":return this.onClearSelection()}}onRequestSelection(t){const e={kind:"selectionAvailable",requestId:t,selection:this.selectionManager.getCurrentSelection()};this.sendFeedback(e)}onClearSelection(){this.selectionManager.clearSelection()}sendFeedback(t){this.messagePort.postMessage(t)}}const $=new class{constructor(t){this.window=t}initAreaManager(){const t=this.initChannel("InitAreaManager");return new I(t)}initSelection(t){const e=this.initChannel("InitSelection");new M(e,t)}initDecorations(t){const e=this.initChannel("InitDecorations");new T(e,t)}initChannel(t){const e=new MessageChannel;return this.window.parent.postMessage(t,"*",[e.port2]),e.port1}}(window),D=$.initAreaManager(),N=new class{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}(window);$.initSelection(N);const F=new class{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new R(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}(window);$.initDecorations(F);const k=function(t){const e=window.document.querySelector("meta[name=viewport]");if(e&&e instanceof HTMLMetaElement)return function(t){const e=/(\w+) *= *([^\s,]+)/g,r=new Map;let n;for(;n=e.exec(t);)null!=n&&r.set(n[1],n[2]);const o=parseFloat(r.get("width")),i=parseFloat(r.get("height"));return o&&i?{width:o,height:i}:void 0}(e.content)}();D.send({kind:"contentSize",size:k});const B=new class{constructor(t){this.messageSender=t}onTap(t){const e={offset:{x:t.clientX,y:t.clientY}};this.messageSender.send({kind:"tap",event:e})}onLinkActivated(t,e){this.messageSender.send({kind:"linkActivated",href:t,outerHtml:e})}onDecorationActivated(t){const e={id:t.id,group:t.group,rect:t.rect,offset:{x:t.event.clientX,y:t.event.clientY}};this.messageSender.send({kind:"decorationActivated",event:e})}}(D);new class{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;const e=this.window.getSelection();if(e&&"Range"==e.type)return;let r,n;if(r=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,r){if(!(r instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(r.href,r.outerHTML),t.stopPropagation(),t.preventDefault()}n=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,n?this.listener.onDecorationActivated(n):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}(window,B,F)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(b)===y&&(h[g]|=1<0&&w[m]>=r+i;)m-=1;m===a&&w[m]<=r&&(w[m]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var m=c(u,h);u=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(d[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var N=r(7002),F=N.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function W(t){return w.call(String(t),/"/g,""")}function L(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!q(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return g?D(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return g?D(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return L(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:K(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(L(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&N)return N(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return K(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?m.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return G.call(t,e)}function H(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function K(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=L(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,w=p(g,"u")>-1;return n(d,r,m,w)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),w=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof w&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return c(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===g(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return b.set(t,"[[Done]]",!0),c(a,!1)})),o&&(m(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,g,d=r(1844);function b(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,d.Z)(t,e,r)}function m(t,e){return 0===e.length||0===t.length?0:1-b(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(g||(g={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===g.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=b(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?m(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?m(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,d=(c?h:y)/g;function b(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${d}px`;const r=Math.floor(e.top/d)*d;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${d}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/d)*d;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const m=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,m,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,b(t,m,m,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}var C=r(5155);r.n(C)().shim();class T{constructor(t,e){this.decorationManager=e,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"registerTemplates":return this.registerTemplates(t.templates);case"addDecoration":return this.addDecoration(t.decoration,t.group);case"removeDecoration":return this.removeDecoration(t.id,t.group)}}registerTemplates(t){this.decorationManager.registerTemplates(t)}addDecoration(t,e){this.decorationManager.addDecoration(t,e)}removeDecoration(t,e){this.decorationManager.removeDecoration(t,e)}}class I{constructor(t){this.messagePort=t}send(t){this.messagePort.postMessage(t)}}class M{constructor(t,e){this.selectionManager=e,this.messagePort=t,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"requestSelection":return this.onRequestSelection(t.requestId);case"clearSelection":return this.onClearSelection()}}onRequestSelection(t){const e={kind:"selectionAvailable",requestId:t,selection:this.selectionManager.getCurrentSelection()};this.sendFeedback(e)}onClearSelection(){this.selectionManager.clearSelection()}sendFeedback(t){this.messagePort.postMessage(t)}}const $=new class{constructor(t){this.window=t}initAreaManager(){const t=this.initChannel("InitAreaManager");return new I(t)}initSelection(t){const e=this.initChannel("InitSelection");new M(e,t)}initDecorations(t){const e=this.initChannel("InitDecorations");new T(e,t)}initChannel(t){const e=new MessageChannel;return this.window.parent.postMessage(t,"*",[e.port2]),e.port1}}(window),D=$.initAreaManager(),N=new class{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}(window);$.initSelection(N);const F=new class{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new R(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}(window);$.initDecorations(F);const k=function(t){const e=window.document.querySelector("meta[name=viewport]");if(e&&e instanceof HTMLMetaElement)return function(t){const e=/(\w+) *= *([^\s,]+)/g,r=new Map;let n;for(;n=e.exec(t);)null!=n&&r.set(n[1],n[2]);const o=parseFloat(r.get("width")),i=parseFloat(r.get("height"));return o&&i?{width:o,height:i}:void 0}(e.content)}();D.send({kind:"contentSize",size:k});const B=new class{constructor(t){this.messageSender=t}onTap(t){const e={offset:{x:t.clientX,y:t.clientY}};this.messageSender.send({kind:"tap",event:e})}onLinkActivated(t,e){this.messageSender.send({kind:"linkActivated",href:t,outerHtml:e})}onDecorationActivated(t){const e={id:t.id,group:t.group,rect:t.rect,offset:{x:t.event.clientX,y:t.event.clientY}};this.messageSender.send({kind:"decorationActivated",event:e})}}(D);new class{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}(window,B,F)}()}(); //# sourceMappingURL=fixed-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map index 9e859a7c7a..24488c9f61 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE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A,WACA,SAEgBtY,QAAQsY,EAAQ3X,SAASxD,gBAIzCmb,EAAQqP,aAAa,oBACoC,SAAzDrP,EAAQ1X,aAAa,mBAAmBzD,cAJjCmb,EAQPA,EAAQW,cACDzmB,KAAK80B,0BAA0BhP,EAAQW,eAE3C,IACX,GHjCiB5T,OAAQqhB,EAAmBvF,E","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/fixed/iframe-message.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-injectable.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","export class IframeMessageSender {\n constructor(messagePort) {\n this.messagePort = messagePort;\n }\n send(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\n/**\n * Script loaded by fixed layout resources.\n */\nimport { DecorationManager, } from \"./common/decoration\";\nimport { GesturesDetector } from \"./common/gestures\";\nimport { SelectionManager } from \"./common/selection\";\nimport { parseViewportString } from \"./util/viewport\";\nimport { FixedInitializerIframeSide } from \"./bridge/all-initialization-bridge\";\nconst initializer = new FixedInitializerIframeSide(window);\nconst messageSender = initializer.initAreaManager();\nconst selectionManager = new SelectionManager(window);\ninitializer.initSelection(selectionManager);\nconst decorationManager = new DecorationManager(window);\ninitializer.initDecorations(decorationManager);\nconst viewportSize = parseContentSize(window.document);\nmessageSender.send({ kind: \"contentSize\", size: viewportSize });\nclass MessagingGesturesListener {\n constructor(messageSender) {\n this.messageSender = messageSender;\n }\n onTap(gestureEvent) {\n const event = {\n offset: { x: gestureEvent.clientX, y: gestureEvent.clientY },\n };\n this.messageSender.send({ kind: \"tap\", event: event });\n }\n onLinkActivated(href, outerHtml) {\n this.messageSender.send({\n kind: \"linkActivated\",\n href: href,\n outerHtml: outerHtml,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated(gestureEvent) {\n const event = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: gestureEvent.rect,\n offset: { x: gestureEvent.event.clientX, y: gestureEvent.event.clientY },\n };\n this.messageSender.send({\n kind: \"decorationActivated\",\n event: event,\n });\n }\n}\nconst messagingListener = new MessagingGesturesListener(messageSender);\nnew GesturesDetector(window, messagingListener, decorationManager);\nfunction parseContentSize(document) {\n const viewport = document.querySelector(\"meta[name=viewport]\");\n if (!viewport || !(viewport instanceof HTMLMetaElement)) {\n return undefined;\n }\n return parseViewportString(viewport.content);\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n const selection = this.window.getSelection();\n if (selection && selection.type == \"Range\") {\n // There's an on-going selection, the tap will dismiss it so we don't forward it.\n // selection.type might be None (collapsed) or Caret with a collapsed range\n // when there is not true selection.\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationGroup","id","styles","items","lastItemId","container","groupId","groupName","add","decoration","cssSelector","textQuote","querySelector","body","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","item","clickableElements","layout","remove","findIndex","it","relayout","clearContainer","requireContainer","createElement","dataset","group","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","clientWidth","getBoundingClientRect","DOMRect","elementTemplate","template","innerHTML","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","DecorationWrapperIframeSide","messagePort","decorationManager","onmessage","onCommand","command","kind","registerTemplates","templates","addDecoration","removeDecoration","IframeMessageSender","send","postMessage","SelectionWrapperIframeSide","manager","selectionManager","onRequestSelection","requestId","onClearSelection","feedback","selection","getCurrentSelection","sendFeedback","clearSelection","initializer","initAreaManager","initChannel","initSelection","initDecorations","initMessage","messageChannel","MessageChannel","port2","port1","messageSender","isSelecting","getSelection","removeAllRanges","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","groups","lastGroupId","addEventListener","lastSize","ResizeObserver","requestAnimationFrame","clientHeight","relayoutDecorations","observe","stylesheet","styleElement","getElementsByTagName","appendChild","getGroup","values","handleDecorationClickEvent","event","groupContent","clientX","clientY","findTarget","viewportSize","viewport","HTMLMetaElement","viewportString","properties","parseViewportString","parseContentSize","messagingListener","onTap","gestureEvent","onLinkActivated","href","outerHtml","onDecorationActivated","listener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","hasAttribute"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC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ACzBnmB,SAASgqB,iBAAiB,SAAUc,IAChCtzB,KAAK00B,QAAQpB,EAAM,IACpB,EACP,CACA,OAAAoB,CAAQpB,GACJ,GAAIA,EAAMqB,iBACN,OAEJ,IAAIC,EAiBAC,EAVJ,GALID,EADAtB,EAAMvzB,kBAAkBmO,YACPlO,KAAK80B,0BAA0BxB,EAAMvzB,QAGrC,KAEjB60B,EAAgB,CAChB,KAAIA,aAA0BG,mBAM1B,OALA/0B,KAAKy0B,SAASJ,gBAAgBO,EAAeN,KAAMM,EAAeI,WAClE1B,EAAM2B,kBACN3B,EAAM4B,gBAKd,CAGIL,EADA70B,KAAK2uB,kBAED3uB,KAAK2uB,kBAAkB0E,2BAA2BC,GAG3B,KAE3BuB,EACA70B,KAAKy0B,SAASD,sBAAsBK,GAGpC70B,KAAKy0B,SAASN,MAAMb,EAI5B,CAEA,yBAAAwB,CAA0BhP,GACtB,OAAe,MAAXA,EACO,MAgBqD,GAdxC,CACpB,IACA,QACA,SACA,SACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,SAEgBtY,QAAQsY,EAAQ3X,SAASxD,gBAIzCmb,EAAQqP,aAAa,oBACoC,SAAzDrP,EAAQ1X,aAAa,mBAAmBzD,cAJjCmb,EAQPA,EAAQW,cACDzmB,KAAK80B,0BAA0BhP,EAAQW,eAE3C,IACX,GH1BiB5T,OAAQqhB,EAAmBvF,E","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/fixed/iframe-message.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-injectable.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","export class IframeMessageSender {\n constructor(messagePort) {\n this.messagePort = messagePort;\n }\n send(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\n/**\n * Script loaded by fixed layout resources.\n */\nimport { DecorationManager, } from \"./common/decoration\";\nimport { GesturesDetector } from \"./common/gestures\";\nimport { SelectionManager } from \"./common/selection\";\nimport { parseViewportString } from \"./util/viewport\";\nimport { FixedInitializerIframeSide } from \"./bridge/all-initialization-bridge\";\nconst initializer = new FixedInitializerIframeSide(window);\nconst messageSender = initializer.initAreaManager();\nconst selectionManager = new SelectionManager(window);\ninitializer.initSelection(selectionManager);\nconst decorationManager = new DecorationManager(window);\ninitializer.initDecorations(decorationManager);\nconst viewportSize = parseContentSize(window.document);\nmessageSender.send({ kind: \"contentSize\", size: viewportSize });\nclass MessagingGesturesListener {\n constructor(messageSender) {\n this.messageSender = messageSender;\n }\n onTap(gestureEvent) {\n const event = {\n offset: { x: gestureEvent.clientX, y: gestureEvent.clientY },\n };\n this.messageSender.send({ kind: \"tap\", event: event });\n }\n onLinkActivated(href, outerHtml) {\n this.messageSender.send({\n kind: \"linkActivated\",\n href: href,\n outerHtml: outerHtml,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated(gestureEvent) {\n const event = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: gestureEvent.rect,\n offset: { x: gestureEvent.event.clientX, y: gestureEvent.event.clientY },\n };\n this.messageSender.send({\n kind: \"decorationActivated\",\n event: event,\n });\n }\n}\nconst messagingListener = new MessagingGesturesListener(messageSender);\nnew GesturesDetector(window, messagingListener, decorationManager);\nfunction parseContentSize(document) {\n const viewport = document.querySelector(\"meta[name=viewport]\");\n if (!viewport || !(viewport instanceof HTMLMetaElement)) {\n return undefined;\n }\n return parseViewportString(viewport.content);\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationGroup","id","styles","items","lastItemId","container","groupId","groupName","add","decoration","cssSelector","textQuote","querySelector","body","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","item","clickableElements","layout","remove","findIndex","it","relayout","clearContainer","requireContainer","createElement","dataset","group","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","clientWidth","getBoundingClientRect","DOMRect","elementTemplate","template","innerHTML","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","DecorationWrapperIframeSide","messagePort","decorationManager","onmessage","onCommand","command","kind","registerTemplates","templates","addDecoration","removeDecoration","IframeMessageSender","send","postMessage","SelectionWrapperIframeSide","manager","selectionManager","onRequestSelection","requestId","onClearSelection","feedback","selection","getCurrentSelection","sendFeedback","clearSelection","initializer","initAreaManager","initChannel","initSelection","initDecorations","initMessage","messageChannel","MessageChannel","port2","port1","messageSender","isSelecting","getSelection","removeAllRanges","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","groups","lastGroupId","addEventListener","lastSize","ResizeObserver","requestAnimationFrame","clientHeight","relayoutDecorations","observe","stylesheet","styleElement","getElementsByTagName","appendChild","getGroup","values","handleDecorationClickEvent","event","groupContent","clientX","clientY","findTarget","viewportSize","viewport","HTMLMetaElement","viewportString","properties","parseViewportString","parseContentSize","messagingListener","onTap","gestureEvent","onLinkActivated","href","outerHtml","onDecorationActivated","listener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","hasAttribute"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js index 7f3f0c2487..4ec13a38a7 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js @@ -1,2 +1,2 @@ -!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],A(r,x([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(b[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function C(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var k=r(7002),B=k.custom,L=_(B)?B:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==z(t)||T&&"object"==typeof t&&T in t)}function $(t){return!("[object RegExp]"!==z(t)||T&&"object"==typeof t&&T in t)}function _(t){if(D)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?C(e,w):w}if("bigint"==typeof e){var x=String(e)+"n";return g?C(e,x):x}var P=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var I,B=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=d.call(b.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=D?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||D?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Z(e,G);return B&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,B)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==z(t)||T&&"object"==typeof t&&T in t)}(e)){var at=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(L&&"function"==typeof e[L]&&k)return k(e,{depth:P-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,B)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(G(t,e))})),Y("Set",c.call(e),ut,B)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(G(E.call(e)));if(function(t){return!("[object Boolean]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==z(t)||T&&"object"==typeof t&&T in t)}(e)&&!$(e)){var ct=Z(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&T&&Object(e)===e&&T in e?m.call(z(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":B?yt+"{"+Q(ct,B)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function z(t){return g.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return U(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,b=f.matcher,d=s(o(e,"lastIndex"));i(b,"lastIndex",d,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(b,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),b=r(1874),d=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==b(e))throw new i("`S` must be a string");if("Boolean"!==b(r))throw new i("`global` must be a boolean");if("Boolean"!==b(n))throw new i("`fullUnicode` must be a boolean");d.set(this,"[[IteratingRegExp]]",t),d.set(this,"[[IteratedString]]",e),d.set(this,"[[Global]]",r),d.set(this,"[[Unicode]]",n),d.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==b(t))throw new i("receiver must be an object");if(!(t instanceof v&&d.has(t,"[[IteratingRegExp]]")&&d.has(t,"[[IteratedString]]")&&d.has(t,"[[Global]]")&&d.has(t,"[[Unicode]]")&&d.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(d.get(t,"[[Done]]"))return u(void 0,!0);var e=d.get(t,"[[IteratingRegExp]]"),r=d.get(t,"[[IteratedString]]"),n=d.get(t,"[[Global]]"),o=d.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return d.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return d.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),b=r(1874);t.exports=function t(e){if("String"!==b(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}class e{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}class n{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}function o(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;const e=this.window.getSelection();if(e&&"Range"==e.type)return;let r,n;if(r=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,r){if(!(r instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(r.href,r.outerHTML),t.stopPropagation(),t.preventDefault()}n=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,n?this.listener.onDecorationActivated(n):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(t,r,n,a){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.scale=1,this.listener=a,new i(t,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};a.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}}),this.metaViewport=n;const s={onIframeLoaded:()=>{this.onIframeLoaded()},onTap:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e);a.onTap({offset:n})},onLinkActivated:(t,e)=>{a.onLinkActivated(t,e)},onDecorationActivated:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e),i=function(t,e){const r={x:t.left,y:t.top},n={x:t.right,y:t.bottom},i=o(r,e),a=o(n,e);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}(t.rect,e),s={id:t.id,group:t.group,rect:i,offset:n};a.onDecorationActivated(s)}};this.page=new e(t,r,s)}setMessagePort(t){this.page.setMessagePort(t)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}loadResource(t){this.page.hide(),this.page.loadPage(t)}onIframeLoaded(){this.page.size&&this.layout()}layout(){if(!this.page.size||!this.viewport)return;const t={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:this.insets.left};this.page.setMargins(t);const e={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},r=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,this.page.size,e);this.metaViewport.content=(new n).setInitialScale(r).setMinimumScale(r).setWidth(this.page.size.width).setHeight(this.page.size.height).build(),this.scale=r,this.page.show(),this.listener.onLayout()}}class s{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);r.n(l)().shim();class f{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const p=document.getElementById("page"),y=document.querySelector("meta[name=viewport]");window.singleArea=new class{constructor(e,r,n,o,i){const s=new t(e,o,i);this.manager=new a(e,r,n,s)}setMessagePort(t){this.manager.setMessagePort(t)}loadResource(t){this.manager.loadResource(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,p,y,window.gestures,window.documentState),window.singleSelection=new class{constructor(t){this.listener=t;const e={onSelectionAvailable:(t,e)=>{const r=JSON.stringify(e);this.listener.onSelectionAvailable(t,r)}};this.wrapper=new f(e)}setMessagePort(t){this.wrapper.setMessagePort(t)}requestSelection(t){this.wrapper.requestSelection(t)}clearSelection(){this.wrapper.clearSelection()}}(window.singleSelectionListener),window.singleDecorations=new class{constructor(){this.wrapper=new s}setMessagePort(t){this.wrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.wrapper.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.wrapper.addDecoration(r,e)}removeDecoration(t,e){this.wrapper.removeDecoration(t,e)}},window.singleInitialization=new class{constructor(t,e,r,n,o,i){this.window=t,this.listener=e,this.iframe=r,this.areaBridge=n,this.selectionBridge=o,this.decorationsBridge=i}loadResource(t){this.iframe.src=t,this.window.addEventListener("message",(t=>{console.log("message"),t.ports[0]&&t.source===this.iframe.contentWindow&&this.onInitMessage(t)}))}onInitMessage(t){console.log(`receiving init message ${t}`);const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":return this.initAreaManager(r);case"InitSelection":return this.initSelection(r);case"InitDecorations":return this.initDecorations(r)}}initAreaManager(t){this.areaBridge.setMessagePort(t),this.listener.onAreaApiAvailable()}initSelection(t){this.selectionBridge.setMessagePort(t),this.listener.onSelectionApiAvailable()}initDecorations(t){this.decorationsBridge.setMessagePort(t),this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,p,window.singleArea,window.singleSelection,window.singleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); +!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],A(r,x([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(b[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function C(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var k=r(7002),B=k.custom,L=_(B)?B:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==z(t)||T&&"object"==typeof t&&T in t)}function $(t){return!("[object RegExp]"!==z(t)||T&&"object"==typeof t&&T in t)}function _(t){if(D)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?C(e,w):w}if("bigint"==typeof e){var x=String(e)+"n";return g?C(e,x):x}var P=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var I,B=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=d.call(b.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=D?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||D?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Z(e,G);return B&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,B)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==z(t)||T&&"object"==typeof t&&T in t)}(e)){var at=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(L&&"function"==typeof e[L]&&k)return k(e,{depth:P-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,B)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(G(t,e))})),Y("Set",c.call(e),ut,B)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(G(E.call(e)));if(function(t){return!("[object Boolean]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==z(t)||T&&"object"==typeof t&&T in t)}(e)&&!$(e)){var ct=Z(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&T&&Object(e)===e&&T in e?m.call(z(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":B?yt+"{"+Q(ct,B)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function z(t){return g.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return U(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,b=f.matcher,d=s(o(e,"lastIndex"));i(b,"lastIndex",d,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(b,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),b=r(1874),d=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==b(e))throw new i("`S` must be a string");if("Boolean"!==b(r))throw new i("`global` must be a boolean");if("Boolean"!==b(n))throw new i("`fullUnicode` must be a boolean");d.set(this,"[[IteratingRegExp]]",t),d.set(this,"[[IteratedString]]",e),d.set(this,"[[Global]]",r),d.set(this,"[[Unicode]]",n),d.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==b(t))throw new i("receiver must be an object");if(!(t instanceof v&&d.has(t,"[[IteratingRegExp]]")&&d.has(t,"[[IteratedString]]")&&d.has(t,"[[Global]]")&&d.has(t,"[[Unicode]]")&&d.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(d.get(t,"[[Done]]"))return u(void 0,!0);var e=d.get(t,"[[IteratingRegExp]]"),r=d.get(t,"[[IteratedString]]"),n=d.get(t,"[[Global]]"),o=d.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return d.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return d.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),b=r(1874);t.exports=function t(e){if("String"!==b(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}class e{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}class n{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}function o(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(t,r,n,a){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.scale=1,this.listener=a,new i(t,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};a.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}}),this.metaViewport=n;const s={onIframeLoaded:()=>{this.onIframeLoaded()},onTap:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e);a.onTap({offset:n})},onLinkActivated:(t,e)=>{a.onLinkActivated(t,e)},onDecorationActivated:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e),i=function(t,e){const r={x:t.left,y:t.top},n={x:t.right,y:t.bottom},i=o(r,e),a=o(n,e);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}(t.rect,e),s={id:t.id,group:t.group,rect:i,offset:n};a.onDecorationActivated(s)}};this.page=new e(t,r,s)}setMessagePort(t){this.page.setMessagePort(t)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}loadResource(t){this.page.hide(),this.page.loadPage(t)}onIframeLoaded(){this.page.size&&this.layout()}layout(){if(!this.page.size||!this.viewport)return;const t={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:this.insets.left};this.page.setMargins(t);const e={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},r=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,this.page.size,e);this.metaViewport.content=(new n).setInitialScale(r).setMinimumScale(r).setWidth(this.page.size.width).setHeight(this.page.size.height).build(),this.scale=r,this.page.show(),this.listener.onLayout()}}class s{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);r.n(l)().shim();class f{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const p=document.getElementById("page"),y=document.querySelector("meta[name=viewport]");window.singleArea=new class{constructor(e,r,n,o,i){const s=new t(e,o,i);this.manager=new a(e,r,n,s)}setMessagePort(t){this.manager.setMessagePort(t)}loadResource(t){this.manager.loadResource(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,p,y,window.gestures,window.documentState),window.singleSelection=new class{constructor(t){this.listener=t;const e={onSelectionAvailable:(t,e)=>{const r=JSON.stringify(e);this.listener.onSelectionAvailable(t,r)}};this.wrapper=new f(e)}setMessagePort(t){this.wrapper.setMessagePort(t)}requestSelection(t){this.wrapper.requestSelection(t)}clearSelection(){this.wrapper.clearSelection()}}(window.singleSelectionListener),window.singleDecorations=new class{constructor(){this.wrapper=new s}setMessagePort(t){this.wrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.wrapper.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.wrapper.addDecoration(r,e)}removeDecoration(t,e){this.wrapper.removeDecoration(t,e)}},window.singleInitialization=new class{constructor(t,e,r,n,o,i){this.window=t,this.listener=e,this.iframe=r,this.areaBridge=n,this.selectionBridge=o,this.decorationsBridge=i}loadResource(t){this.iframe.src=t,this.window.addEventListener("message",(t=>{console.log("message"),t.ports[0]&&t.source===this.iframe.contentWindow&&this.onInitMessage(t)}))}onInitMessage(t){console.log(`receiving init message ${t}`);const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":return this.initAreaManager(r);case"InitSelection":return this.initSelection(r);case"InitDecorations":return this.initDecorations(r)}}initAreaManager(t){this.areaBridge.setMessagePort(t),this.listener.onAreaApiAvailable()}initSelection(t){this.selectionBridge.setMessagePort(t),this.listener.onSelectionApiAvailable()}initDecorations(t){this.decorationsBridge.setMessagePort(t),this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,p,window.singleArea,window.singleSelection,window.singleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); //# sourceMappingURL=fixed-single-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map index 8c52ab532f..e98ee69206 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-single-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BAC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Y3E,IACrCwK,QAAQC,IAAI,WACPzK,EAAM0K,MAAM,IAGb1K,EAAMhI,SAAW3Y,KAAKkiB,OAAOO,eAC7BziB,KAAKsrB,cAAc3K,EACvB,GAER,CACA,aAAA2K,CAAc3K,GACVwK,QAAQC,IAAI,0BAA0BzK,KACtC,MAAM4K,EAAc5K,EAAMoD,KACpBpB,EAAchC,EAAM0K,MAAM,GAChC,OAAQE,GACJ,IAAK,kBACD,OAAOvrB,KAAKwrB,gBAAgB7I,GAChC,IAAK,gBACD,OAAO3iB,KAAKyrB,cAAc9I,GAC9B,IAAK,kBACD,OAAO3iB,KAAK0rB,gBAAgB/I,GAExC,CACA,eAAA6I,CAAgB7I,GACZ3iB,KAAKgrB,WAAWtI,eAAeC,GAC/B3iB,KAAKmiB,SAASwJ,oBAClB,CACA,aAAAF,CAAc9I,GACV3iB,KAAKirB,gBAAgBvI,eAAeC,GACpC3iB,KAAKmiB,SAASyJ,yBAClB,CACA,eAAAF,CAAgB/I,GACZ3iB,KAAKkrB,kBAAkBxI,eAAeC,GACtC3iB,KAAKmiB,SAAS0J,0BAClB,GJlC8DjY,OAAQA,OAAOkY,cAAe5J,EAAQtO,OAAO4V,WAAY5V,OAAOwW,gBAAiBxW,OAAO6W,mBAC1J7W,OAAOkY,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/single-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-single.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export class ReflowableListenerAdapter {\n constructor(gesturesBridge) {\n this.gesturesBridge = gesturesBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n const selection = this.window.getSelection();\n if (selection && selection.type == \"Range\") {\n // There's an on-going selection, the tap will dismiss it so we don't forward it.\n // selection.type might be None (collapsed) or Caret with a collapsed range\n // when there is not true selection.\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class SingleAreaManager {\n constructor(window, iframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.scale = 1;\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n this.metaViewport = metaViewport;\n const pageListener = {\n onIframeLoaded: () => {\n this.onIframeLoaded();\n },\n onTap: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(event.rect, boundingRect);\n const shiftedEvent = {\n id: event.id,\n group: event.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.page = new PageManager(window, iframe, pageListener);\n }\n setMessagePort(messagePort) {\n this.page.setMessagePort(messagePort);\n }\n setViewport(viewport, insets) {\n if (this.viewport == viewport && this.insets == insets) {\n return;\n }\n this.viewport = viewport;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n loadResource(url) {\n this.page.hide();\n this.page.loadPage(url);\n }\n onIframeLoaded() {\n if (!this.page.size) {\n // FIXME: raise error\n }\n else {\n this.layout();\n }\n }\n layout() {\n if (!this.page.size || !this.viewport) {\n return;\n }\n const margins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.page.setMargins(margins);\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, this.page.size, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(this.page.size.width)\n .setHeight(this.page.size.height)\n .build();\n this.scale = scale;\n this.page.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedSingleAreaBridge as FixedSingleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedSingleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedSingleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedSingleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst iframe = document.getElementById(\"page\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nwindow.singleArea = new FixedSingleAreaBridge(window, iframe, metaViewport, window.gestures, window.documentState);\nwindow.singleSelection = new FixedSingleSelectionBridge(window.singleSelectionListener);\nwindow.singleDecorations = new FixedSingleDecorationsBridge();\nwindow.singleInitialization = new FixedSingleInitializationBridge(window, window.fixedApiState, iframe, window.singleArea, window.singleSelection, window.singleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","onTap","event","stringify","offset","onLinkActivated","href","outerHtml","onDecorationActivated","stringOffset","stringRect","rect","id","group","onLayout","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","data","kind","onContentSizeAvailable","URL","_a","onIframeLoaded","ViewportStringBuilder","setInitialScale","scale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","offsetToParentCoordinates","iframeRect","visualViewport","offsetLeft","offsetTop","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","selection","getSelection","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","SingleAreaManager","metaViewport","fit","insets","clientX","clientY","pageListener","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","shiftedEvent","page","setViewport","viewport","layout","setFit","loadResource","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","registerTemplates","templates","send","addDecoration","decoration","removeDecoration","postMessage","TrimDirection","ResolveDirection","selectionListener","onFeedback","requestSelection","requestId","clearSelection","feedback","onSelectionAvailable","getElementById","querySelector","singleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","singleSelection","wrapperListener","selectionAsJson","wrapper","singleSelectionListener","singleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","singleInitialization","areaBridge","selectionBridge","decorationsBridge","console","log","ports","onInitMessage","initMessage","initAreaManager","initSelection","initDecorations","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-single-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAKF,EAAOD,GAE1EI,EAAQb,EAAa,qCAAqC,GAC1Dc,EAAkBd,EAAa,2BAA2B,GAC1De,EAAOf,EAAa,cAExB,GAAIc,EACH,IACCA,EAAgB,CAAC,EAAG,IAAK,CAAEE,MAAO,GACnC,CAAE,MAAOC,GAERH,EAAkB,IACnB,CAGDX,EAAOC,QAAU,SAAkBc,GAClC,IAAIC,EAAOR,EAAcH,EAAME,EAAOU,WAYtC,OAXIP,GAASC,GACDD,EAAMM,EAAM,UACdE,cAERP,EACCK,EACA,SACA,CAAEH,MAAO,EAAID,EAAK,EAAGG,EAAiBI,QAAUF,UAAUE,OAAS,MAI/DH,CACR,EAEA,IAAII,EAAY,WACf,OAAOZ,EAAcH,EAAMC,EAAQW,UACpC,EAEIN,EACHA,EAAgBX,EAAOC,QAAS,QAAS,CAAEY,MAAOO,IAElDpB,EAAOC,QAAQoB,MAAQD,C,oCC3CxB,IAAIE,EAAyB,EAAQ,IAAR,GAEzBzB,EAAe,EAAQ,MAEvBc,EAAkBW,GAA0BzB,EAAa,2BAA2B,GAEpF0B,EAAe1B,EAAa,iBAC5B2B,EAAa3B,EAAa,eAE1B4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1N,OAAOkX,qBAAuB,IIXvB,MACH,WAAAta,CAAYoD,EAAQuO,EAAUD,EAAQ6I,EAAYC,EAAiBC,GAC/DjrB,KAAK4T,OAASA,EACd5T,KAAKmiB,SAAWA,EAChBniB,KAAKkiB,OAASA,EACdliB,KAAK+qB,WAAaA,EAClB/qB,KAAKgrB,gBAAkBA,EACvBhrB,KAAKirB,kBAAoBA,CAC7B,CACA,YAAAxD,CAAahE,GACTzjB,KAAKkiB,OAAOwB,IAAMD,EAClBzjB,KAAK4T,OAAO0R,iBAAiB,WAAY3E,IACrCuK,QAAQC,IAAI,WACPxK,EAAMyK,MAAM,IAGbzK,EAAMhI,SAAW3Y,KAAKkiB,OAAOO,eAC7BziB,KAAKqrB,cAAc1K,EACvB,GAER,CACA,aAAA0K,CAAc1K,GACVuK,QAAQC,IAAI,0BAA0BxK,KACtC,MAAM2K,EAAc3K,EAAMoD,KACpBpB,EAAchC,EAAMyK,MAAM,GAChC,OAAQE,GACJ,IAAK,kBACD,OAAOtrB,KAAKurB,gBAAgB5I,GAChC,IAAK,gBACD,OAAO3iB,KAAKwrB,cAAc7I,GAC9B,IAAK,kBACD,OAAO3iB,KAAKyrB,gBAAgB9I,GAExC,CACA,eAAA4I,CAAgB5I,GACZ3iB,KAAK+qB,WAAWrI,eAAeC,GAC/B3iB,KAAKmiB,SAASuJ,oBAClB,CACA,aAAAF,CAAc7I,GACV3iB,KAAKgrB,gBAAgBtI,eAAeC,GACpC3iB,KAAKmiB,SAASwJ,yBAClB,CACA,eAAAF,CAAgB9I,GACZ3iB,KAAKirB,kBAAkBvI,eAAeC,GACtC3iB,KAAKmiB,SAASyJ,0BAClB,GJlC8DhY,OAAQA,OAAOiY,cAAe3J,EAAQtO,OAAO2V,WAAY3V,OAAOuW,gBAAiBvW,OAAO4W,mBAC1J5W,OAAOiY,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/single-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-single.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class SingleAreaManager {\n constructor(window, iframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.scale = 1;\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n this.metaViewport = metaViewport;\n const pageListener = {\n onIframeLoaded: () => {\n this.onIframeLoaded();\n },\n onTap: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(event.rect, boundingRect);\n const shiftedEvent = {\n id: event.id,\n group: event.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.page = new PageManager(window, iframe, pageListener);\n }\n setMessagePort(messagePort) {\n this.page.setMessagePort(messagePort);\n }\n setViewport(viewport, insets) {\n if (this.viewport == viewport && this.insets == insets) {\n return;\n }\n this.viewport = viewport;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n loadResource(url) {\n this.page.hide();\n this.page.loadPage(url);\n }\n onIframeLoaded() {\n if (!this.page.size) {\n // FIXME: raise error\n }\n else {\n this.layout();\n }\n }\n layout() {\n if (!this.page.size || !this.viewport) {\n return;\n }\n const margins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.page.setMargins(margins);\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, this.page.size, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(this.page.size.width)\n .setHeight(this.page.size.height)\n .build();\n this.scale = scale;\n this.page.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedSingleAreaBridge as FixedSingleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedSingleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedSingleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedSingleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst iframe = document.getElementById(\"page\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nwindow.singleArea = new FixedSingleAreaBridge(window, iframe, metaViewport, window.gestures, window.documentState);\nwindow.singleSelection = new FixedSingleSelectionBridge(window.singleSelectionListener);\nwindow.singleDecorations = new FixedSingleDecorationsBridge();\nwindow.singleInitialization = new FixedSingleInitializationBridge(window, window.fixedApiState, iframe, window.singleArea, window.singleSelection, window.singleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","onTap","event","stringify","offset","onLinkActivated","href","outerHtml","onDecorationActivated","stringOffset","stringRect","rect","id","group","onLayout","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","data","kind","onContentSizeAvailable","URL","_a","onIframeLoaded","ViewportStringBuilder","setInitialScale","scale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","offsetToParentCoordinates","iframeRect","visualViewport","offsetLeft","offsetTop","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","SingleAreaManager","metaViewport","fit","insets","clientX","clientY","pageListener","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","shiftedEvent","page","setViewport","viewport","layout","setFit","loadResource","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","registerTemplates","templates","send","addDecoration","decoration","removeDecoration","postMessage","TrimDirection","ResolveDirection","selectionListener","onFeedback","requestSelection","requestId","clearSelection","feedback","onSelectionAvailable","selection","getElementById","querySelector","singleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","singleSelection","wrapperListener","selectionAsJson","wrapper","singleSelectionListener","singleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","singleInitialization","areaBridge","selectionBridge","decorationsBridge","console","log","ports","onInitMessage","initMessage","initAreaManager","initSelection","initDecorations","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index 518935823b..96b9717072 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;const e=this.window.getSelection();if(e&&"Range"==e.type)return;let r,n;if(r=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,r){if(!(r instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(r.href,r.outerHTML),t.stopPropagation(),t.preventDefault()}n=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,n?this.listener.onDecorationActivated(n):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class ${constructor(t){this.gesturesBridge=t}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}}class D{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class F{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class k{constructor(t){this.document=t}getOffsetForLocation(t,e){const r=function(t){return JSON.parse(t)}(t);return r.htmlId?this.getOffsetForHtmlId(r.htmlId,e):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);if(!r)return null;const n=r.getBoundingClientRect();return e?n.top+window.scrollY:n.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class M{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class ${constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){const r=function(t){return JSON.parse(t)}(t);return r.htmlId?this.getOffsetForHtmlId(r.htmlId,e):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);if(!r)return null;const n=r.getBoundingClientRect();return e?n.top+window.scrollY:n.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index 7d04e83bd2..16c2ed898b 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GAAK,EAEvCxB,EAAM,CACNK,EAAG,IAAIsB,YAAYF,EAAO,GAC1BlB,EAAG,IAAIoB,YAAYF,EAAO,GAC1BV,YAAa,IAAIY,YAAYF,EAAO,IAExCzB,EAAIe,YAAYa,KAAK,GAAK,IAC1B5B,EAAIe,YAAYU,GAAQ,IA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QA,OAAO6kB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n const selection = this.window.getSelection();\n if (selection && selection.type == \"Range\") {\n // There's an on-going selection, the tap will dismiss it so we don't forward it.\n // selection.type might be None (collapsed) or Caret with a collapsed range\n // when there is not true selection.\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge) {\n this.gesturesBridge = gesturesBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","export class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n const actualLocation = parseLocation(location);\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n const rect = element.getBoundingClientRect();\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","selection","getSelection","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionManager","isSelecting","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","htmlId","getOffsetForHtmlId","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAA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lBmCI,CAA4BhkB,QAE/C,GADA6iB,GAAgB,EACZI,EAEA,MAER,CACAJ,GAAgB,EACXD,EAKD5iB,OAAOikB,cAAcC,qBAJrBlkB,OAAOikB,cAAcE,2BACrBvB,GAAsB,EAZ1B,CAgBA,GACF,IAEGrL,QAAQ5hB,SAASqhB,KAAK,IAEnC,IEjCO,MACH,WAAAha,CAAYgD,EAAQud,GAChBpwB,KAAK6S,OAASA,EACd7S,KAAKowB,SAAWA,EAChBpwB,KAAKi3B,gBACLj3B,KAAKk3B,UACT,CACA,QAAAA,GACIl3B,KAAK6S,OAAOskB,KAAO,IAAIrC,EAAqB90B,KAAK6S,OAAOrK,UACxDxI,KAAKowB,SAASgH,qBACd,MAAMC,EAAiB,IAAI1D,EAA0B9gB,OAAOykB,SAAUzkB,OAAO0kB,mBACvElH,EAAoB,IAAI7G,EAAkB3W,QAChD7S,KAAK6S,OAAO2kB,WAAa,IAAI/C,EAAU5hB,OAAOrK,UAC9CxI,KAAKowB,SAASqH,oBACdz3B,KAAK6S,OAAO0f,UAAY,IAAIiC,EAA0B3hB,OAAQ,IAAI8e,EAAiB9e,SACnF7S,KAAKowB,SAASsH,0BACd13B,KAAK6S,OAAO8kB,YAAc,IAAIvE,EAA4BvgB,OAAQwd,GAClErwB,KAAKowB,SAASwH,2BACd,IAAIzH,EAAiBtd,OAAQwkB,EAAgBhH,GAC7C,IAAIe,EAAkBve,OAAQwkB,EAClC,CAEA,aAAAJ,GACIj3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMiO,EAAOrvB,SAASmiB,cAAc,QACpCkN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B12B,KAAK6S,OAAOrK,SAASsvB,KAAKhN,YAAY+M,EAAK,GAEnD,GFIsBhlB,OAAQA,OAAOklB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","export class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n const actualLocation = parseLocation(location);\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n const rect = element.getBoundingClientRect();\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","htmlId","getOffsetForHtmlId","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt new file mode 100644 index 0000000000..1827faf4d0 --- /dev/null +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt @@ -0,0 +1,53 @@ +package org.readium.navigator.web.internals.webapi + +import android.webkit.WebView +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.MainScope +import kotlinx.coroutines.launch + +public interface SelectionListener { + + public fun onSelectionStart() + + public fun onSelectionEnd() +} + +public class DelegatingSelectionListener( + private val onSelectionStartDelegate: () -> Unit, + private val onSelectionEndDelegate: () -> Unit, +) : SelectionListener { + + override fun onSelectionStart() { + onSelectionStartDelegate() + } + + override fun onSelectionEnd() { + onSelectionEndDelegate() + } +} + +public class SelectionListenerApi( + webView: WebView, + public var listener: SelectionListener? = null, +) { + private val coroutineScope: CoroutineScope = + MainScope() + + init { + webView.addJavascriptInterface(this, "selectionListener") + } + + @android.webkit.JavascriptInterface + public fun onSelectionStart() { + coroutineScope.launch { + listener?.onSelectionStart() + } + } + + @android.webkit.JavascriptInterface + public fun onSelectionEnd() { + coroutineScope.launch { + listener?.onSelectionEnd() + } + } +} diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt index 407f0befee..b561c4144a 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/RelaxedWebView.kt @@ -9,6 +9,7 @@ package org.readium.navigator.web.internals.webview import android.content.Context import android.graphics.Rect import android.view.ActionMode +import android.view.Menu import android.view.View import android.webkit.WebView @@ -55,7 +56,9 @@ public class RelaxedWebView(context: Context) : WebView(context) { private var actionModeCallback: ActionMode.Callback? = null - public fun setCustomSelectionActionModeCallback(callback: ActionMode.Callback?) { + public fun setCustomSelectionActionModeCallback( + callback: ActionMode.Callback?, + ) { actionModeCallback = callback } @@ -67,23 +70,40 @@ public class RelaxedWebView(context: Context) : WebView(context) { nextLayoutListener = {} } - override fun startActionMode(callback: ActionMode.Callback?): ActionMode? { - val customCallback = actionModeCallback - ?: return super.startActionMode(callback) + private var hasActionMode: Boolean = false - val parent = parent ?: return null - return parent.startActionModeForChild(this, customCallback) + override fun onOverScrolled(scrollX: Int, scrollY: Int, clampedX: Boolean, clampedY: Boolean) { + // Workaround addressing a bug in the Android WebView where the viewport is scrolled while + // dragging the text selection handles. + // See https://github.com/readium/kotlin-toolkit/issues/325 + if (hasActionMode) { + return + } + + super.onOverScrolled(scrollX, scrollY, clampedX, clampedY) } - override fun startActionMode(callback: ActionMode.Callback?, type: Int): ActionMode? { - val customCallback = actionModeCallback - ?: return super.startActionMode(callback, type) + override fun startActionMode(callback: ActionMode.Callback): ActionMode? { + return startActionMode(callback, ActionMode.TYPE_PRIMARY) + } + + override fun startActionMode(callback: ActionMode.Callback, type: Int): ActionMode? { + val decoratedCallback = CallbackDecorator( + callback = actionModeCallback ?: callback, + onCreateActionModeCallback = { hasActionMode = true }, + onDestroyActionModeCallback = { hasActionMode = false } + ) - val parent = parent ?: return null val wrapper = Callback2Wrapper( - customCallback, + decoratedCallback, callback2 = callback as? ActionMode.Callback2 ) + + if (actionModeCallback == null) { + return super.startActionMode(wrapper, type) + } + + val parent = parent ?: return null return parent.startActionModeForChild(this, wrapper, type) } } @@ -98,6 +118,23 @@ private class Callback2Wrapper( ?: super.onGetContentRect(mode, view, outRect) } +private class CallbackDecorator( + private val callback: ActionMode.Callback, + private val onCreateActionModeCallback: () -> Unit, + private val onDestroyActionModeCallback: () -> Unit, +) : ActionMode.Callback by callback { + + override fun onCreateActionMode(mode: ActionMode?, menu: Menu?): Boolean { + onCreateActionModeCallback() + return callback.onCreateActionMode(mode, menu) + } + + override fun onDestroyActionMode(mode: ActionMode?) { + callback.onDestroyActionMode(mode) + onDestroyActionModeCallback() + } +} + /** * Best effort to delay the execution of a block until the Webview * has received data up-to-date at the moment when the call occurs or newer. diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index be903ce999..d29ca25f4c 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -189,7 +189,7 @@ public fun ReflowableWebRendition( onDocumentResized = { state.scrollState.onDocumentResized(index) state.updateLocation() - } + }, ) } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index cd137e2203..cc7c61e863 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -50,6 +50,7 @@ import org.readium.navigator.web.internals.webapi.Decoration import org.readium.navigator.web.internals.webapi.DelegatingDocumentApiListener import org.readium.navigator.web.internals.webapi.DelegatingGesturesListener import org.readium.navigator.web.internals.webapi.DelegatingReflowableApiStateListener +import org.readium.navigator.web.internals.webapi.DelegatingSelectionListener import org.readium.navigator.web.internals.webapi.DocumentStateApi import org.readium.navigator.web.internals.webapi.GesturesApi import org.readium.navigator.web.internals.webapi.ReadiumCssApi @@ -57,6 +58,7 @@ import org.readium.navigator.web.internals.webapi.ReflowableApiStateApi import org.readium.navigator.web.internals.webapi.ReflowableDecorationApi import org.readium.navigator.web.internals.webapi.ReflowableMoveApi import org.readium.navigator.web.internals.webapi.ReflowableSelectionApi +import org.readium.navigator.web.internals.webapi.SelectionListenerApi import org.readium.navigator.web.internals.webview.RelaxedWebView import org.readium.navigator.web.internals.webview.WebView import org.readium.navigator.web.internals.webview.WebViewScrollController @@ -110,10 +112,15 @@ internal fun ReflowableResource( mutableStateOf(null) } + var selectionListenerApi by remember(webViewState.webView) { + mutableStateOf(null) + } + LaunchedEffect(webViewState.webView) { webViewState.webView?.let { webView -> gesturesApi = GesturesApi(webView) documentStateApi = DocumentStateApi(webView) + selectionListenerApi = SelectionListenerApi(webView) } } @@ -282,29 +289,42 @@ internal fun ReflowableResource( } } - LaunchedEffect(gesturesApi, onTap, onLinkActivated, padding) { + LaunchedEffect(gesturesApi, selectionListenerApi, onTap, onLinkActivated, padding) { gesturesApi?.let { gesturesApi -> - gesturesApi.listener = DelegatingGesturesListener( - onTapDelegate = { offset -> - val shiftedOffset = offset + paddingShift - onTap(TapEvent(shiftedOffset)) - }, - onLinkActivatedDelegate = { href, outerHtml -> - onLinkActivated(publicationBaseUrl.relativize(href), outerHtml) - }, - onDecorationActivatedDelegate = { id, group, rect, offset -> - val decoration = decorations.value[group]?.firstOrNull { it.id.value == id } - ?: return@DelegatingGesturesListener - - val event = DecorationListener.OnActivatedEvent( - decoration = decoration, - group = group, - rect = rect.shift(paddingShift), - offset = offset + paddingShift - ) - onDecorationActivated(event) - } - ) + selectionListenerApi?.let { selectionListenerApi -> + var isSelecting = false + selectionListenerApi.listener = DelegatingSelectionListener( + onSelectionStartDelegate = { isSelecting = true }, + onSelectionEndDelegate = { isSelecting = false } + ) + + gesturesApi.listener = DelegatingGesturesListener( + onTapDelegate = { offset -> + // There's an on-going selection, the tap will dismiss it so we don't forward it. + if (isSelecting) { + return@DelegatingGesturesListener + } + + val shiftedOffset = offset + paddingShift + onTap(TapEvent(shiftedOffset)) + }, + onLinkActivatedDelegate = { href, outerHtml -> + onLinkActivated(publicationBaseUrl.relativize(href), outerHtml) + }, + onDecorationActivatedDelegate = { id, group, rect, offset -> + val decoration = decorations.value[group]?.firstOrNull { it.id.value == id } + ?: return@DelegatingGesturesListener + + val event = DecorationListener.OnActivatedEvent( + decoration = decoration, + group = group, + rect = rect.shift(paddingShift), + offset = offset + paddingShift + ) + onDecorationActivated(event) + } + ) + } } } @@ -362,7 +382,9 @@ internal fun ReflowableResource( } LaunchedEffect(webViewState.webView, actionModeCallback) { - webViewState.webView?.setCustomSelectionActionModeCallback(actionModeCallback) + webViewState.webView?.setCustomSelectionActionModeCallback( + callback = actionModeCallback + ) } val orientationRef by rememberUpdatedRef(orientation) From 247b8612255ca5b58af1cffceeac54fce72f8ffd Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Mon, 15 Dec 2025 06:43:51 +0100 Subject: [PATCH 16/56] Fix insets management in paginated mode --- .../r2/navigator/epub/css/ReadiumCss.kt | 4 ++-- .../navigator/web/internals/util/Padding.kt | 8 +++---- .../web/reflowable/ReflowableWebRendition.kt | 23 +++++++++++++++---- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/readium/navigator/src/main/java/org/readium/r2/navigator/epub/css/ReadiumCss.kt b/readium/navigator/src/main/java/org/readium/r2/navigator/epub/css/ReadiumCss.kt index 8c73ebe6b8..7b35cc681a 100644 --- a/readium/navigator/src/main/java/org/readium/r2/navigator/epub/css/ReadiumCss.kt +++ b/readium/navigator/src/main/java/org/readium/r2/navigator/epub/css/ReadiumCss.kt @@ -6,7 +6,7 @@ package org.readium.r2.navigator.epub.css -import android.net.Uri +import androidx.core.net.toUri import org.jsoup.Jsoup import org.jsoup.nodes.Document import org.jsoup.nodes.Element @@ -130,7 +130,7 @@ internal data class ReadiumCss( if (googleFonts.isNotEmpty()) { val families = googleFonts.joinToString("|") { it.name } - val uri = Uri.parse("https://fonts.googleapis.com/css") + val uri = "https://fonts.googleapis.com/css".toUri() .buildUpon() .appendQueryParameter("family", families) .build() diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt index 5c51c71472..33ce0b234d 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt @@ -12,10 +12,10 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp public data class AbsolutePaddingValues( - val top: Dp, - val right: Dp, - val bottom: Dp, - val left: Dp, + val top: Dp = 0.dp, + val right: Dp = 0.dp, + val bottom: Dp = 0.dp, + val left: Dp = 0.dp, ) { public constructor(vertical: Dp = 0.dp, horizontal: Dp = 0.dp) : this(top = vertical, right = horizontal, bottom = vertical, left = horizontal) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index d29ca25f4c..b1c4902e17 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -14,8 +14,11 @@ import androidx.compose.foundation.gestures.ScrollableDefaults import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.WindowInsetsSides +import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.displayCutout import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider @@ -55,6 +58,7 @@ import org.readium.navigator.web.internals.util.rememberUpdatedRef import org.readium.navigator.web.internals.util.toLayoutDirection import org.readium.navigator.web.reflowable.resource.ReflowablePagingLayoutInfo import org.readium.navigator.web.reflowable.resource.ReflowableResource +import org.readium.r2.navigator.preferences.Axis import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.AbsoluteUrl import org.readium.r2.shared.util.RelativeUrl @@ -93,17 +97,26 @@ public fun ReflowableWebRendition( val coroutineScope = rememberCoroutineScope() - val resourcePadding = - if (state.layoutDelegate.overflow.value.scroll) { - AbsolutePaddingValues() - } else { + val resourcePadding = when (state.layoutDelegate.overflow.value.axis) { + Axis.HORIZONTAL -> when (LocalConfiguration.current.orientation) { Configuration.ORIENTATION_LANDSCAPE -> AbsolutePaddingValues(vertical = 20.dp) else -> AbsolutePaddingValues(vertical = 40.dp) } + Axis.VERTICAL -> { + val paddingInsets = windowInsets.only(WindowInsetsSides.Vertical) + val bottom = paddingInsets.asPaddingValues().calculateBottomPadding() + val top = paddingInsets.asPaddingValues().calculateTopPadding() + AbsolutePaddingValues(top = top, bottom = bottom) } + } + + val pagerPaddingInsets = when (state.layoutDelegate.overflow.value.axis) { + Axis.HORIZONTAL -> windowInsets.only(WindowInsetsSides.Vertical) + Axis.VERTICAL -> windowInsets.only(WindowInsetsSides.Horizontal) + } val flingBehavior = if (state.layoutDelegate.overflow.value.scroll) { ScrollableDefaults.flingBehavior() @@ -140,7 +153,7 @@ public fun ReflowableWebRendition( onTap = { onTapOnPadding(it, viewportSize.value, inputListener) } ) } - .windowInsetsPadding(windowInsets), + .windowInsetsPadding(pagerPaddingInsets), state = state.pagerState, scrollState = state.scrollState, flingBehavior = flingBehavior, From fcad96b06e133fe6fecb5c8027c17b9c3b85f8a4 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Sat, 20 Dec 2025 16:23:56 +0100 Subject: [PATCH 17/56] Fix background update on FXL --- .../readium/navigator/web/fixedlayout/spread/SpreadWebView.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SpreadWebView.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SpreadWebView.kt index 1b29c6643c..a8f86f2841 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SpreadWebView.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SpreadWebView.kt @@ -120,6 +120,8 @@ internal fun SpreadWebView( state.webView?.setCustomSelectionActionModeCallback(actionModeCallback) } + state.webView?.setBackgroundColor(backgroundColor.toArgb()) + // Hide content before initial position is settled if (showPlaceholder) { Box( From 9f7aba4a82a931735cd916d13a43785b4a5493be Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Sun, 4 Jan 2026 09:32:53 +0100 Subject: [PATCH 18/56] Fix FontFamiliy Declarations --- .../navigator/preferences/UserPreferences.kt | 1 - .../web/common/FontFamilyDeclarations.kt | 31 ++----------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/demos/navigator/src/main/java/org/readium/demo/navigator/preferences/UserPreferences.kt b/demos/navigator/src/main/java/org/readium/demo/navigator/preferences/UserPreferences.kt index 6d458a9072..65ea221724 100644 --- a/demos/navigator/src/main/java/org/readium/demo/navigator/preferences/UserPreferences.kt +++ b/demos/navigator/src/main/java/org/readium/demo/navigator/preferences/UserPreferences.kt @@ -48,7 +48,6 @@ import org.readium.r2.shared.util.Language /** * Stateful user settings component. */ - @Composable fun

, S : Settings, E : PreferencesEditor> UserPreferences( editor: E, diff --git a/readium/navigators/web/common/src/main/kotlin/org/readium/navigator/web/common/FontFamilyDeclarations.kt b/readium/navigators/web/common/src/main/kotlin/org/readium/navigator/web/common/FontFamilyDeclarations.kt index 015e0a8b88..b0f01173c5 100644 --- a/readium/navigators/web/common/src/main/kotlin/org/readium/navigator/web/common/FontFamilyDeclarations.kt +++ b/readium/navigators/web/common/src/main/kotlin/org/readium/navigator/web/common/FontFamilyDeclarations.kt @@ -8,10 +8,11 @@ package org.readium.navigator.web.common -import kotlinx.collections.immutable.* import kotlinx.collections.immutable.ImmutableList +import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.persistentListOf -import kotlinx.serialization.Serializable +import kotlinx.collections.immutable.plus +import kotlinx.collections.immutable.toImmutableList import org.readium.r2.navigator.preferences.FontFamily import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.Either @@ -214,29 +215,3 @@ public enum class FontWeight(public val value: Int) { EXTRA_BOLD(800), BLACK(900), } - -/** - * Typeface for a publication's text. - * - * For a list of vetted font families, see https://readium.org/readium-css/docs/CSS10-libre_fonts. - */ -@ExperimentalReadiumApi -@JvmInline -@Serializable -public value class FontFamily(public val name: String) { - - public companion object { - // Generic font families - // See https://www.w3.org/TR/css-fonts-4/#generic-font-families - public val SERIF: FontFamily = FontFamily("serif") - public val SANS_SERIF: FontFamily = FontFamily("sans-serif") - public val CURSIVE: FontFamily = FontFamily("cursive") - public val FANTASY: FontFamily = FontFamily("fantasy") - public val MONOSPACE: FontFamily = FontFamily("monospace") - - // Accessibility fonts embedded with Readium - public val ACCESSIBLE_DFA: FontFamily = FontFamily("AccessibleDfA") - public val IA_WRITER_DUOSPACE: FontFamily = FontFamily("IA Writer Duospace") - public val OPEN_DYSLEXIC: FontFamily = FontFamily("OpenDyslexic") - } -} From ccbb3bb3574711753bf3aad2dc524e6f12d08a16 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 6 Jan 2026 16:33:18 +0100 Subject: [PATCH 19/56] Fix margins when reflowable content is zoomed out. --- .../navigator/web/reflowable/css/PaginatedLayout.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt index 63d1b21432..33d759238d 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt @@ -10,6 +10,8 @@ package org.readium.navigator.web.reflowable.css import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.coerceAtMost +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.times import kotlin.math.floor import kotlin.math.roundToInt import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings @@ -43,7 +45,7 @@ internal class PaginatedLayoutResolver( val maxLineLength = settings.maximalLineLength?.let { baseMaxLineLength * it.toFloat() * fontScale } - return when (val colCount = settings.columnCount) { + val layout = when (val colCount = settings.columnCount) { null -> layoutAuto( minimalPageGutter = minPageGutter, @@ -62,6 +64,11 @@ internal class PaginatedLayoutResolver( minimalLineLength = minLineLength, ) } + + // CSS zoom multiplies the px line length by + // the zoom factor so we need to do the reverse thing. + // If we don't, line length decreases with fontSize. + return layout.copy(lineLength = layout.lineLength?.let { (it.value / settings.fontSize).dp }) } private fun layoutAuto( From ab79c184f827f98233b6c81521548d3a6f15d380 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Mon, 12 Jan 2026 09:28:52 +0100 Subject: [PATCH 20/56] Fix N columns mode, make margin cover insets --- .../web/reflowable/ReflowableWebRendition.kt | 5 +++ .../reflowable/ReflowableWebRenditionState.kt | 14 +++++--- .../web/reflowable/css/PaginatedLayout.kt | 33 ++++++++++++------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index b1c4902e17..7049036eb3 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -36,6 +36,7 @@ import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.max import kotlinx.collections.immutable.toImmutableMap import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -93,6 +94,10 @@ public fun ReflowableWebRendition( state.layoutDelegate.viewportSize = viewportSize.value + state.layoutDelegate.horizontalSafeDrawing = windowInsets.asPaddingValues().let { + max(it.calculateLeftPadding(layoutDirection), it.calculateRightPadding(layoutDirection)) + } + state.layoutDelegate.fontScale = LocalDensity.current.fontScale val coroutineScope = rememberCoroutineScope() diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 18d1a8427e..213b806738 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -20,6 +20,7 @@ import androidx.compose.runtime.mutableStateMapOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp import kotlin.coroutines.suspendCoroutine @@ -311,13 +312,15 @@ internal class ReflowableLayoutDelegate( private val paginatedLayoutResolver = PaginatedLayoutResolver( baseMinMargins = 15.dp, - baseMinLineLength = 200.dp, - baseOptimalLineLength = 400.dp, - baseMaxLineLength = 600.dp + baseMinLineLength = 400.dp, + baseOptimalLineLength = 600.dp, + baseMaxLineLength = 800.dp ) internal var viewportSize: DpSize? by mutableStateOf(null) + internal var horizontalSafeDrawing: Dp? by mutableStateOf(null) + internal var fontScale: Float? by mutableStateOf(null) override var settings: ReflowableWebSettings by mutableStateOf(initialSettings) @@ -343,14 +346,15 @@ internal class ReflowableLayoutDelegate( ).withSettings( settings = settings, ).let { injector -> - if (viewportSize == null || fontScale == null || settings.scroll) { + if (viewportSize == null || horizontalSafeDrawing == null || fontScale == null || settings.scroll) { injector } else { injector.withLayout( paginatedLayoutResolver.layout( settings = settings, systemFontScale = fontScale!!, - viewportWidth = viewportSize!!.width + viewportWidth = viewportSize!!.width, + horizontalSafeDrawing = horizontalSafeDrawing!! ) ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt index 33d759238d..06b0e8e48f 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt @@ -11,7 +11,6 @@ package org.readium.navigator.web.reflowable.css import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.coerceAtMost import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.times import kotlin.math.floor import kotlin.math.roundToInt import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings @@ -34,10 +33,11 @@ internal class PaginatedLayoutResolver( settings: ReflowableWebSettings, systemFontScale: Float, viewportWidth: Dp, + horizontalSafeDrawing: Dp, ): PaginatedLayout { val fontScale = systemFontScale * settings.fontSize.toFloat() val minPageGutter = - baseMinMargins * settings.minMargins.toFloat() + (baseMinMargins * settings.minMargins.toFloat()).coerceAtLeast(horizontalSafeDrawing) val optimalLineLength = baseOptimalLineLength * settings.optimalLineLength.toFloat() * fontScale val minLineLength = @@ -45,7 +45,7 @@ internal class PaginatedLayoutResolver( val maxLineLength = settings.maximalLineLength?.let { baseMaxLineLength * it.toFloat() * fontScale } - val layout = when (val colCount = settings.columnCount) { + var layout = when (val colCount = settings.columnCount) { null -> layoutAuto( minimalPageGutter = minPageGutter, @@ -65,10 +65,21 @@ internal class PaginatedLayoutResolver( ) } - // CSS zoom multiplies the px line length by + // CSS zoom multiplies the px line value by // the zoom factor so we need to do the reverse thing. // If we don't, line length decreases with fontSize. - return layout.copy(lineLength = layout.lineLength?.let { (it.value / settings.fontSize).dp }) + layout = layout.copy( + lineLength = layout.lineLength?.let { (it.value / settings.fontSize).dp }, + pageGutter = (layout.pageGutter.value / settings.fontSize).dp + ) + + // Readium CSS lineLength is a max-width property on body including pageGutter which is + // padding. + layout = layout.copy( + lineLength = layout.lineLength?.let { it + layout.pageGutter * 2 } + ) + + return layout } private fun layoutAuto( @@ -119,7 +130,7 @@ internal class PaginatedLayoutResolver( val actualAvailableWidth = viewportWidth - minPageGutter * 2 * colCount - val minimalLineLength = minimalLineLength?.coerceAtMost(viewportWidth - minPageGutter * 2) + val minimalLineLength = minimalLineLength?.coerceAtMost(actualAvailableWidth) val maximalLineLength = maximalLineLength?.coerceAtLeast(minPageGutter * 2) @@ -135,12 +146,10 @@ internal class PaginatedLayoutResolver( maximalLineLength = maximalLineLength ) maximalLineLength != null && lineLength > maximalLineLength -> - layoutNColumns( - colCount = colCount + 1, - minimalPageGutter = minPageGutter, - viewportWidth = viewportWidth, - minimalLineLength = minimalLineLength, - maximalLineLength = maximalLineLength, + PaginatedLayout( + colCount = colCount, + lineLength = maximalLineLength, + pageGutter = minPageGutter, ) else -> PaginatedLayout( From e3634881f008fee81a2c2a46e6c9b8f968a60a12 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Mon, 12 Jan 2026 16:31:57 +0100 Subject: [PATCH 21/56] Fixt crash on orientation change in FXL --- .../web/fixedlayout/FixedWebRendition.kt | 18 ++++++++++-------- .../web/fixedlayout/FixedWebRenditionState.kt | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index c623093b6c..7beddebf77 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -112,14 +112,6 @@ public fun FixedWebRendition( state.initController(location = currentLocation()) } - LaunchedEffect(state) { - snapshotFlow { - state.pagerState.currentPage - }.onEach { - state.navigationDelegate.updateLocation(currentLocation()) - }.launchIn(this) - } - val coroutineScope = rememberCoroutineScope() val inputListenerState = rememberUpdatedState(inputListener) @@ -296,6 +288,16 @@ public fun FixedWebRendition( } } } + + // We must recompose Pager before calling currentLocation() because after an orientation + // change, pagerState.currentPage won't be correct before if the layout has changed. + LaunchedEffect(state) { + snapshotFlow { + state.pagerState.currentPage + }.onEach { + state.navigationDelegate.updateLocation(currentLocation()) + }.launchIn(this) + } } } } diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 2649e56f9c..7e0c4753dc 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -27,6 +27,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll +import kotlinx.coroutines.currentCoroutineContext import org.readium.navigator.common.Decoration import org.readium.navigator.common.DecorationController import org.readium.navigator.common.NavigationController @@ -276,7 +277,7 @@ internal class FixedSelectionDelegate( override suspend fun currentSelection(): Selection? { val visiblePages = pagerState.layoutInfo.visiblePagesInfo.map { it.index } - val coroutineScope = CoroutineScope(coroutineContext + SupervisorJob()) + val coroutineScope = CoroutineScope(currentCoroutineContext() + SupervisorJob()) val (page, selection) = visiblePages .mapNotNull { index -> selectionApis[index]?.let { index to it } } .map { (index, api) -> From 63b33900ca47b9466e7631fc91d6918e09811cc2 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 14 Jan 2026 14:27:39 +0100 Subject: [PATCH 22/56] Fix crash on layout change --- .../web/fixedlayout/FixedWebRendition.kt | 47 ++++++------------- .../web/fixedlayout/FixedWebRenditionState.kt | 9 ++-- 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index 7beddebf77..2bda3a906e 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -98,12 +98,12 @@ public fun FixedWebRendition( rememberUpdatedState(DisplayArea(viewportSize.value, safeDrawingPadding)) fun currentLocation(): FixedWebLocation { - val spreadIndex = state.pagerState.currentPage - val itemIndex = state.layoutDelegate.layout.value.pageIndexForSpread(spreadIndex) + val (currentSpreadIndex, currentLayout) = state.lastMeasureLayout.value + val itemIndex = currentLayout.pageIndexForSpread(currentSpreadIndex) val href = state.publication.readingOrder[itemIndex].href val mediaType = state.publication.readingOrder[itemIndex].mediaType val position = Position(itemIndex + 1)!! - val totalProgression = Progression(spreadIndex / state.layoutDelegate.layout.value.spreads.size.toDouble())!! + val totalProgression = Progression(currentSpreadIndex / currentLayout.spreads.size.toDouble())!! return FixedWebLocation(href, position, totalProgression, mediaType) } @@ -148,14 +148,12 @@ public fun FixedWebRendition( ) } - LaunchedEffect(state.layoutDelegate.layout.value, state.controller) { - state.controller?.let { - val currentHref = it.location.href - val spreadIndex = checkNotNull( - state.layoutDelegate.layout.value.spreadIndexForHref(currentHref) - ) - state.pagerState.requestScrollToPage(spreadIndex) - } + LaunchedEffect(state, state.layoutDelegate.layout.value) { + snapshotFlow { + state.pagerState.currentPage + }.onEach { + state.navigationDelegate.updateLocation(currentLocation()) + }.launchIn(this) } val spreadFlingBehavior = Scrollable2DDefaults.flingBehavior() @@ -177,13 +175,7 @@ public fun FixedWebRendition( orientation = Orientation.Horizontal, beyondViewportPageCount = 2, enableScroll = true, - key = { index -> - val readingProgression = state.layoutDelegate.layout.value.readingProgression - val spread = state.layoutDelegate.layout.value.spreads[index] - val pages = spread.pages.map { it.index } - val fit = state.layoutDelegate.fit.value - "$readingProgression $spread $pages $fit" - }, + key = { index -> state.layoutDelegate.layout.value.spreads[index].pages.first().index }, ) { index -> val initialProgression = when { index < state.pagerState.currentPage -> 1.0 @@ -193,8 +185,9 @@ public fun FixedWebRendition( val spread = state.layoutDelegate.layout.value.spreads[index] val decorations = state.decorationDelegate.decorations - .mapValues { groupDecorations -> groupDecorations.value.filter { it.location.href in spread.pages.map { it.href } } } - .toImmutableMap() + .mapValues { groupDecorations -> + groupDecorations.value.filter { it.location.href in spread.pages.map { it.href } } + }.toImmutableMap() when (spread) { is SingleViewportSpread -> { @@ -202,7 +195,7 @@ public fun FixedWebRendition( SingleSpreadState( index = index, htmlData = state.preloadedData.fixedSingleContent, - publicationBaseUrl = WebViewServer.Companion.publicationBaseHref, + publicationBaseUrl = WebViewServer.publicationBaseHref, webViewClient = state.webViewClient, spread = spread, fit = state.layoutDelegate.fit, @@ -247,7 +240,7 @@ public fun FixedWebRendition( DoubleSpreadState( index = index, htmlData = state.preloadedData.fixedDoubleContent, - publicationBaseUrl = WebViewServer.Companion.publicationBaseHref, + publicationBaseUrl = WebViewServer.publicationBaseHref, webViewClient = state.webViewClient, spread = spread, fit = state.layoutDelegate.fit, @@ -288,16 +281,6 @@ public fun FixedWebRendition( } } } - - // We must recompose Pager before calling currentLocation() because after an orientation - // change, pagerState.currentPage won't be correct before if the layout has changed. - LaunchedEffect(state) { - snapshotFlow { - state.pagerState.currentPage - }.onEach { - state.navigationDelegate.updateLocation(currentLocation()) - }.launchIn(this) - } } } } diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 7e0c4753dc..6acaf0eeba 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -18,8 +18,8 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateMapOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap -import kotlin.coroutines.coroutineContext import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentMapOf @@ -96,6 +96,9 @@ public class FixedWebRenditionState internal constructor( initialSettings ) + internal val lastMeasureLayout: State> = derivedStateOf { + pagerState.currentPage to Snapshot.withoutReadObservation { layoutDelegate.layout.value } } + private val initialSpread = layoutDelegate.layout.value .spreadIndexForHref(initialLocation.href) ?: 0 @@ -202,8 +205,8 @@ internal class FixedLayoutDelegate( } val layout: State = derivedStateOf { - val spreads = layoutResolver.layout(settings) - Layout(settings.readingProgression, spreads) + val newSpreads = layoutResolver.layout(settings) + Layout(settings.readingProgression, newSpreads) } val fit: State = From d75f30952ec1863e66f993d50c9e0c58da8e10fd Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 14 Jan 2026 15:15:30 +0100 Subject: [PATCH 23/56] Remove node_modules --- node_modules/.bin/corepack | 1 - node_modules/.bin/pnpm | 1 - node_modules/.bin/pnpx | 1 - node_modules/.bin/yarn | 1 - node_modules/.bin/yarnpkg | 1 - node_modules/.package-lock.json | 23 - node_modules/corepack/CHANGELOG.md | 582 - node_modules/corepack/LICENSE.md | 7 - node_modules/corepack/README.md | 381 - node_modules/corepack/dist/corepack.js | 4 - node_modules/corepack/dist/lib/corepack.cjs | 23713 ---------------- node_modules/corepack/dist/npm.js | 4 - node_modules/corepack/dist/npx.js | 4 - node_modules/corepack/dist/pnpm.js | 4 - node_modules/corepack/dist/pnpx.js | 4 - node_modules/corepack/dist/yarn.js | 4 - node_modules/corepack/dist/yarnpkg.js | 4 - node_modules/corepack/package.json | 102 - node_modules/corepack/shims/corepack | 12 - node_modules/corepack/shims/corepack.cmd | 7 - node_modules/corepack/shims/corepack.ps1 | 28 - node_modules/corepack/shims/nodewin/corepack | 12 - .../corepack/shims/nodewin/corepack.cmd | 7 - .../corepack/shims/nodewin/corepack.ps1 | 28 - node_modules/corepack/shims/nodewin/npm | 12 - node_modules/corepack/shims/nodewin/npm.cmd | 7 - node_modules/corepack/shims/nodewin/npm.ps1 | 28 - node_modules/corepack/shims/nodewin/npx | 12 - node_modules/corepack/shims/nodewin/npx.cmd | 7 - node_modules/corepack/shims/nodewin/npx.ps1 | 28 - node_modules/corepack/shims/nodewin/pnpm | 12 - node_modules/corepack/shims/nodewin/pnpm.cmd | 7 - node_modules/corepack/shims/nodewin/pnpm.ps1 | 28 - node_modules/corepack/shims/nodewin/pnpx | 12 - node_modules/corepack/shims/nodewin/pnpx.cmd | 7 - node_modules/corepack/shims/nodewin/pnpx.ps1 | 28 - node_modules/corepack/shims/nodewin/yarn | 12 - node_modules/corepack/shims/nodewin/yarn.cmd | 7 - node_modules/corepack/shims/nodewin/yarn.ps1 | 28 - node_modules/corepack/shims/nodewin/yarnpkg | 12 - .../corepack/shims/nodewin/yarnpkg.cmd | 7 - .../corepack/shims/nodewin/yarnpkg.ps1 | 28 - node_modules/corepack/shims/npm | 12 - node_modules/corepack/shims/npm.cmd | 7 - node_modules/corepack/shims/npm.ps1 | 28 - node_modules/corepack/shims/npx | 12 - node_modules/corepack/shims/npx.cmd | 7 - node_modules/corepack/shims/npx.ps1 | 28 - node_modules/corepack/shims/pnpm | 12 - node_modules/corepack/shims/pnpm.cmd | 7 - node_modules/corepack/shims/pnpm.ps1 | 28 - node_modules/corepack/shims/pnpx | 12 - node_modules/corepack/shims/pnpx.cmd | 7 - node_modules/corepack/shims/pnpx.ps1 | 28 - node_modules/corepack/shims/yarn | 12 - node_modules/corepack/shims/yarn.cmd | 7 - node_modules/corepack/shims/yarn.ps1 | 28 - node_modules/corepack/shims/yarnpkg | 12 - node_modules/corepack/shims/yarnpkg.cmd | 7 - node_modules/corepack/shims/yarnpkg.ps1 | 28 - .../navigator/common/LocationElements.kt | 37 + .../org/readium/navigator/common/Locations.kt | 6 + .../web/fixedlayout/FixedWebLocations.kt | 8 +- .../web/fixedlayout/FixedWebRenditionState.kt | 3 +- .../src/bridge/reflowable-move-bridge.ts | 59 + .../generated/reflowable-injectable-script.js | 2 +- .../reflowable-injectable-script.js.map | 2 +- .../web/internals/webapi/ReflowableMoveApi.kt | 19 +- .../web/reflowable/ReflowableWebLocations.kt | 25 +- .../reflowable/ReflowableWebRenditionState.kt | 2 + .../reflowable/resource/ReflowableResource.kt | 33 +- .../resource/ReflowableResourceState.kt | 8 + 72 files changed, 185 insertions(+), 25518 deletions(-) delete mode 120000 node_modules/.bin/corepack delete mode 120000 node_modules/.bin/pnpm delete mode 120000 node_modules/.bin/pnpx delete mode 120000 node_modules/.bin/yarn delete mode 120000 node_modules/.bin/yarnpkg delete mode 100644 node_modules/.package-lock.json delete mode 100644 node_modules/corepack/CHANGELOG.md delete mode 100644 node_modules/corepack/LICENSE.md delete mode 100644 node_modules/corepack/README.md delete mode 100755 node_modules/corepack/dist/corepack.js delete mode 100644 node_modules/corepack/dist/lib/corepack.cjs delete mode 100755 node_modules/corepack/dist/npm.js delete mode 100755 node_modules/corepack/dist/npx.js delete mode 100755 node_modules/corepack/dist/pnpm.js delete mode 100755 node_modules/corepack/dist/pnpx.js delete mode 100755 node_modules/corepack/dist/yarn.js delete mode 100755 node_modules/corepack/dist/yarnpkg.js delete mode 100644 node_modules/corepack/package.json delete mode 100644 node_modules/corepack/shims/corepack delete mode 100644 node_modules/corepack/shims/corepack.cmd delete mode 100644 node_modules/corepack/shims/corepack.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/corepack delete mode 100644 node_modules/corepack/shims/nodewin/corepack.cmd delete mode 100644 node_modules/corepack/shims/nodewin/corepack.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/npm delete mode 100644 node_modules/corepack/shims/nodewin/npm.cmd delete mode 100644 node_modules/corepack/shims/nodewin/npm.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/npx delete mode 100644 node_modules/corepack/shims/nodewin/npx.cmd delete mode 100644 node_modules/corepack/shims/nodewin/npx.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/pnpm delete mode 100644 node_modules/corepack/shims/nodewin/pnpm.cmd delete mode 100644 node_modules/corepack/shims/nodewin/pnpm.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/pnpx delete mode 100644 node_modules/corepack/shims/nodewin/pnpx.cmd delete mode 100644 node_modules/corepack/shims/nodewin/pnpx.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/yarn delete mode 100644 node_modules/corepack/shims/nodewin/yarn.cmd delete mode 100644 node_modules/corepack/shims/nodewin/yarn.ps1 delete mode 100644 node_modules/corepack/shims/nodewin/yarnpkg delete mode 100644 node_modules/corepack/shims/nodewin/yarnpkg.cmd delete mode 100644 node_modules/corepack/shims/nodewin/yarnpkg.ps1 delete mode 100755 node_modules/corepack/shims/npm delete mode 100644 node_modules/corepack/shims/npm.cmd delete mode 100755 node_modules/corepack/shims/npm.ps1 delete mode 100755 node_modules/corepack/shims/npx delete mode 100644 node_modules/corepack/shims/npx.cmd delete mode 100755 node_modules/corepack/shims/npx.ps1 delete mode 100755 node_modules/corepack/shims/pnpm delete mode 100644 node_modules/corepack/shims/pnpm.cmd delete mode 100755 node_modules/corepack/shims/pnpm.ps1 delete mode 100755 node_modules/corepack/shims/pnpx delete mode 100644 node_modules/corepack/shims/pnpx.cmd delete mode 100755 node_modules/corepack/shims/pnpx.ps1 delete mode 100755 node_modules/corepack/shims/yarn delete mode 100644 node_modules/corepack/shims/yarn.cmd delete mode 100755 node_modules/corepack/shims/yarn.ps1 delete mode 100755 node_modules/corepack/shims/yarnpkg delete mode 100644 node_modules/corepack/shims/yarnpkg.cmd delete mode 100755 node_modules/corepack/shims/yarnpkg.ps1 diff --git a/node_modules/.bin/corepack b/node_modules/.bin/corepack deleted file mode 120000 index e29d408564..0000000000 --- a/node_modules/.bin/corepack +++ /dev/null @@ -1 +0,0 @@ -../corepack/dist/corepack.js \ No newline at end of file diff --git a/node_modules/.bin/pnpm b/node_modules/.bin/pnpm deleted file mode 120000 index 7df34b77e0..0000000000 --- a/node_modules/.bin/pnpm +++ /dev/null @@ -1 +0,0 @@ -../corepack/dist/pnpm.js \ No newline at end of file diff --git a/node_modules/.bin/pnpx b/node_modules/.bin/pnpx deleted file mode 120000 index 512398f2c0..0000000000 --- a/node_modules/.bin/pnpx +++ /dev/null @@ -1 +0,0 @@ -../corepack/dist/pnpx.js \ No newline at end of file diff --git a/node_modules/.bin/yarn b/node_modules/.bin/yarn deleted file mode 120000 index ce0948b397..0000000000 --- a/node_modules/.bin/yarn +++ /dev/null @@ -1 +0,0 @@ -../corepack/dist/yarn.js \ No newline at end of file diff --git a/node_modules/.bin/yarnpkg b/node_modules/.bin/yarnpkg deleted file mode 120000 index 4b845ffbf5..0000000000 --- a/node_modules/.bin/yarnpkg +++ /dev/null @@ -1 +0,0 @@ -../corepack/dist/yarnpkg.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index a8243db4c1..0000000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "kotlin-toolkit", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/corepack": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/corepack/-/corepack-0.34.5.tgz", - "integrity": "sha512-G+ui7ZUxTzgwRc45pi7OhOybKFnGpxVDp0khf+eFdw/gcQmZfme4nUh4Z4URY9YPoaZYP86zNZmqV/T2Bf5/rA==", - "license": "MIT", - "bin": { - "corepack": "dist/corepack.js", - "pnpm": "dist/pnpm.js", - "pnpx": "dist/pnpx.js", - "yarn": "dist/yarn.js", - "yarnpkg": "dist/yarnpkg.js" - }, - "engines": { - "node": "^20.10.0 || ^22.11.0 || >=24.0.0" - } - } - } -} diff --git a/node_modules/corepack/CHANGELOG.md b/node_modules/corepack/CHANGELOG.md deleted file mode 100644 index 63afb3ebaf..0000000000 --- a/node_modules/corepack/CHANGELOG.md +++ /dev/null @@ -1,582 +0,0 @@ -# Changelog - -## [0.34.5](https://github.com/nodejs/corepack/compare/v0.34.4...v0.34.5) (2025-11-24) - - -### Bug Fixes - -* **pnpm:** fix bin path for v11 ([#776](https://github.com/nodejs/corepack/issues/776)) ([0c8048a](https://github.com/nodejs/corepack/commit/0c8048adc61651f6eb798448675d3ecc4a7e26a9)) -* update package manager versions ([#773](https://github.com/nodejs/corepack/issues/773)) ([06c286b](https://github.com/nodejs/corepack/commit/06c286b5fc171e43090b5eed5cd501bc9580927f)) - -## [0.34.4](https://github.com/nodejs/corepack/compare/v0.34.3...v0.34.4) (2025-11-14) - - -### Bug Fixes - -* bump pnpm version in `config.json` ([#768](https://github.com/nodejs/corepack/issues/768)) ([99a9a6e](https://github.com/nodejs/corepack/commit/99a9a6eb1b6e918ceb896b3d558bb5ed583bdc70)) -* ignore devEngines version range when CLI provides a version ([#762](https://github.com/nodejs/corepack/issues/762)) ([ac518c4](https://github.com/nodejs/corepack/commit/ac518c4106f8d9ceb4e85e6c3614b1eba5d03fcb)) -* use `lstatSync` in `generatePosixLink` ([#767](https://github.com/nodejs/corepack/issues/767)) ([a02bea0](https://github.com/nodejs/corepack/commit/a02bea078eb584ed7492ec561626987e35386bae)) - -## [0.34.3](https://github.com/nodejs/corepack/compare/v0.34.2...v0.34.3) (2025-11-07) - - -### Bug Fixes - -* update package manager versions ([#765](https://github.com/nodejs/corepack/issues/765)) ([13a2e98](https://github.com/nodejs/corepack/commit/13a2e989ee37694a7ec1b1d60acdaa28f90642d1)) -* Yarn switch install support and tests ([#761](https://github.com/nodejs/corepack/issues/761)) ([d04d483](https://github.com/nodejs/corepack/commit/d04d4839aeecaf4fca989c577f6c000dc90be933)) - -## [0.34.2](https://github.com/nodejs/corepack/compare/v0.34.1...v0.34.2) (2025-10-31) - - -### Bug Fixes - -* bump package manager versions ([#754](https://github.com/nodejs/corepack/issues/754)) ([35e3869](https://github.com/nodejs/corepack/commit/35e3869f3f4d21bbfccdf78ea564ab0723d6f36f)) -* fix potential race condition in `node-tar` ([#757](https://github.com/nodejs/corepack/pull/757)) ([78808a7](78808a72691655fe5140c02ae41d4baef88cd9fa)) - -## [0.34.1](https://github.com/nodejs/corepack/compare/v0.34.0...v0.34.1) (2025-10-17) - - -### Bug Fixes - -* incorrect registry origin check ([#743](https://github.com/nodejs/corepack/issues/743)) ([cc840b2](https://github.com/nodejs/corepack/commit/cc840b2d232a29c225d2436d350640f0035ed28b)) -* update package manager versions ([#728](https://github.com/nodejs/corepack/issues/728)) ([78ce029](https://github.com/nodejs/corepack/commit/78ce0297a9152bb5c68f724821a9a0095b408334)) - -## [0.34.0](https://github.com/nodejs/corepack/compare/v0.33.0...v0.34.0) (2025-07-19) - - -### ⚠ BREAKING CHANGES - -* drop Node.js 18.x and 23.x support - -### Features - -* update package manager versions ([#719](https://github.com/nodejs/corepack/issues/719)) ([7707ea7](https://github.com/nodejs/corepack/commit/7707ea7350c129ad3aae8ca08e9e80fcf164dcb6)) - - -### Miscellaneous Chores - -* remove Node.js 18.x and 23.x usage, add 24.x ([#718](https://github.com/nodejs/corepack/issues/718)) ([783a42f](https://github.com/nodejs/corepack/commit/783a42fbe35371964e9dde75e2263b179f53bc0c)) - -## [0.33.0](https://github.com/nodejs/corepack/compare/v0.32.0...v0.33.0) (2025-06-02) - - -### Features - -* Adds guard to avoid stepping on Yarn's feet ([#714](https://github.com/nodejs/corepack/issues/714)) ([5fc3691](https://github.com/nodejs/corepack/commit/5fc3691354eb5bdeca17a9495b234584353f0151)) -* update package manager versions ([#671](https://github.com/nodejs/corepack/issues/671)) ([b45b3a3](https://github.com/nodejs/corepack/commit/b45b3a3244bacfbaf65188ae8c04209a1e98307d)) - - -### Bug Fixes - -* debug text typo ([#698](https://github.com/nodejs/corepack/issues/698)) ([0b94797](https://github.com/nodejs/corepack/commit/0b94797f96e30e46e466873fe7d437d0471cd92c)) - -## [0.32.0](https://github.com/nodejs/corepack/compare/v0.31.0...v0.32.0) (2025-02-28) - - -### Features - -* add limited support for `devEngines` ([#643](https://github.com/nodejs/corepack/issues/643)) ([b456268](https://github.com/nodejs/corepack/commit/b4562688513f23e37e37b0d69a0daff33ca84c8d)) -* add more informative error when fetching latest stable fails ([#644](https://github.com/nodejs/corepack/issues/644)) ([53b1fe7](https://github.com/nodejs/corepack/commit/53b1fe75c47c06bd72a8b8f8bb699a47c9ca32fb)) -* add support for `.corepack.env` ([#642](https://github.com/nodejs/corepack/issues/642)) ([9b95b46](https://github.com/nodejs/corepack/commit/9b95b46f05e50fe1c60f05309c210ba8fe4e23c5)) -* update package manager versions ([#617](https://github.com/nodejs/corepack/issues/617)) ([b83bb5e](https://github.com/nodejs/corepack/commit/b83bb5ec150980c998b9c7053dff307d912cb508)) - - -### Bug Fixes - -* do not resolve fallback descriptor when `packageManager` is defined ([#632](https://github.com/nodejs/corepack/issues/632)) ([12e77e5](https://github.com/nodejs/corepack/commit/12e77e506946d42a0de9ce8e68d75af8454d6776)) -* **doc:** fix link to proxy library ([#636](https://github.com/nodejs/corepack/issues/636)) ([bae0839](https://github.com/nodejs/corepack/commit/bae08397943d4b99437389b4286546361091f4b3)) -* replace explicit with specify as verb ([#665](https://github.com/nodejs/corepack/issues/665)) ([351d86c](https://github.com/nodejs/corepack/commit/351d86c20226a8c18bfe212be27401f2908b1595)) -* **use:** do not throw on invalid `packageManager` ([#663](https://github.com/nodejs/corepack/issues/663)) ([4be72f6](https://github.com/nodejs/corepack/commit/4be72f6941afa0c9b2b7d26635016bb7b560df8a)) - -## [0.31.0](https://github.com/nodejs/corepack/compare/v0.30.0...v0.31.0) (2025-01-27) - - -### ⚠ BREAKING CHANGES - -* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) - -### Features - -* update package manager versions ([#595](https://github.com/nodejs/corepack/issues/595)) ([c7a9bde](https://github.com/nodejs/corepack/commit/c7a9bde16dcbbb7e6ef03fef740656cde7ade360)) - - -### Bug Fixes - -* only print message for `UsageError`s ([#602](https://github.com/nodejs/corepack/issues/602)) ([72a588c](https://github.com/nodejs/corepack/commit/72a588c2370c17e415b24fe389efdafb3c84e90b)) -* update npm registry keys ([#614](https://github.com/nodejs/corepack/issues/614)) ([8c90caa](https://github.com/nodejs/corepack/commit/8c90caab7f1c5c9b89f1de113bc1dfc441bf25d2)) - - -### Miscellaneous Chores - -* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) ([8bebc0c](https://github.com/nodejs/corepack/commit/8bebc0c0a5cbcdeec41673dcbaf581e6e1c1be11)) - -## [0.30.0](https://github.com/nodejs/corepack/compare/v0.29.4...v0.30.0) (2024-11-23) - - -### Features - -* update package manager versions ([#578](https://github.com/nodejs/corepack/issues/578)) ([a286c8f](https://github.com/nodejs/corepack/commit/a286c8f5537ea9ecf9b6ff53c7bc3e8da4e3c8bb)) - - -### Performance Improvements - -* prefer `module.enableCompileCache` over `v8-compile-cache` ([#574](https://github.com/nodejs/corepack/issues/574)) ([cba6905](https://github.com/nodejs/corepack/commit/cba690575bd606faeee54bd512ccb8797d49055f)) - -## [0.29.4](https://github.com/nodejs/corepack/compare/v0.29.3...v0.29.4) (2024-09-07) - - -### Features - -* update package manager versions ([#543](https://github.com/nodejs/corepack/issues/543)) ([b819e40](https://github.com/nodejs/corepack/commit/b819e404dbb23c4ae3d5dbe55e21de74d714ee9c)) - -## [0.29.3](https://github.com/nodejs/corepack/compare/v0.29.2...v0.29.3) (2024-07-21) - - -### Bug Fixes - -* fallback to `shasum` when `integrity` is not defined ([#542](https://github.com/nodejs/corepack/issues/542)) ([eb63873](https://github.com/nodejs/corepack/commit/eb63873c6c617a2f8ac7106e26ccfe8aa3ae1fb9)) -* make `DEBUG=corepack` more useful ([#538](https://github.com/nodejs/corepack/issues/538)) ([6019d7b](https://github.com/nodejs/corepack/commit/6019d7b56e85bd8b7b58a1a487922c707e70e30e)) - -## [0.29.2](https://github.com/nodejs/corepack/compare/v0.29.1...v0.29.2) (2024-07-13) - - -### Bug Fixes - -* trigger release after 0.29.1 failed to publish ([18e29ce](https://github.com/nodejs/corepack/commit/18e29ce3c465b64d48ccf3feef7cd1be94da70b0)) - -## [0.29.1](https://github.com/nodejs/corepack/compare/v0.29.0...v0.29.1) (2024-07-13) - - -### Bug Fixes - -* trigger release after 0.29.0 failed to publish ([e6ba066](https://github.com/nodejs/corepack/commit/e6ba06657b0985c112f288932ca39c0562129566)) - -## [0.29.0](https://github.com/nodejs/corepack/compare/v0.28.2...v0.29.0) (2024-07-12) - - -### Features - -* parallelize linking, unlinking and installing ([#524](https://github.com/nodejs/corepack/issues/524)) ([f0734e6](https://github.com/nodejs/corepack/commit/f0734e6e8023ff361dac179c0d8656740d550c27)) -* update package manager versions ([#492](https://github.com/nodejs/corepack/issues/492)) ([3e3b046](https://github.com/nodejs/corepack/commit/3e3b04619cb4a91f207a72fb450f6fc4e2f01aec)) - - -### Bug Fixes - -* replace npm registry domain in tarball URL ([#502](https://github.com/nodejs/corepack/issues/502)) ([db6fae5](https://github.com/nodejs/corepack/commit/db6fae50cf44884d1e9a6f7e99402e7e807ba3ca)) -* selectively import required semver functions ([#511](https://github.com/nodejs/corepack/issues/511)) ([e7ad533](https://github.com/nodejs/corepack/commit/e7ad533d43dc9495493f0d883c3cbbb94caa1d41)) - -## [0.28.2](https://github.com/nodejs/corepack/compare/v0.28.1...v0.28.2) (2024-05-31) - - -### Features - -* update package manager versions ([#481](https://github.com/nodejs/corepack/issues/481)) ([e1abb83](https://github.com/nodejs/corepack/commit/e1abb832416a793b490b2b51b4082fe822fc932c)) - -## [0.28.1](https://github.com/nodejs/corepack/compare/v0.28.0...v0.28.1) (2024-05-10) - - -### Features - -* add support for `COREPACK_INTEGRITY_KEYS=0` ([#470](https://github.com/nodejs/corepack/issues/470)) ([f15ebc2](https://github.com/nodejs/corepack/commit/f15ebc289ebcd6a86580f15ae3c4ef0e1be37c4b)) -* update package manager versions ([#469](https://github.com/nodejs/corepack/issues/469)) ([985895b](https://github.com/nodejs/corepack/commit/985895bccb5ec68b3645c540d8500c572e1ccadb)) - - -### Bug Fixes - -* COREPACK_NPM_REGISTRY should allow for username/password auth ([#466](https://github.com/nodejs/corepack/issues/466)) ([6efa349](https://github.com/nodejs/corepack/commit/6efa34988229918debe6e881d45ba6715282f283)) - -## [0.28.0](https://github.com/nodejs/corepack/compare/v0.27.0...v0.28.0) (2024-04-20) - - -### ⚠ BREAKING CHANGES - -* call `executePackageManagerRequest` directly ([#430](https://github.com/nodejs/corepack/issues/430)) - -### Bug Fixes - -* call `executePackageManagerRequest` directly ([#430](https://github.com/nodejs/corepack/issues/430)) ([0f9b748](https://github.com/nodejs/corepack/commit/0f9b74864048d5dc150a63cc582966af0c5f363f)) - -## [0.27.0](https://github.com/nodejs/corepack/compare/v0.26.0...v0.27.0) (2024-04-19) - - -### ⚠ BREAKING CHANGES - -* attempting to download a version from the npm registry (or a mirror) that was published using the now deprecated PGP signature without providing a hash will trigger an error. Users can disable the signature verification using a environment variable. - -### Features - -* separate read and write operations on lastKnownGood.json ([#446](https://github.com/nodejs/corepack/issues/446)) ([c449adc](https://github.com/nodejs/corepack/commit/c449adc81822a604ee8f00ae2b53fc411535f96d)) -* update package manager versions ([#425](https://github.com/nodejs/corepack/issues/425)) ([1423190](https://github.com/nodejs/corepack/commit/142319056424b1e0da2bdbe801c52c5910023707)) -* update package manager versions ([#462](https://github.com/nodejs/corepack/issues/462)) ([56816c2](https://github.com/nodejs/corepack/commit/56816c2b7ebc9926f07048b0ec4ff6025bb4e293)) -* verify integrity signature when downloading from npm registry ([#432](https://github.com/nodejs/corepack/issues/432)) ([e561dd0](https://github.com/nodejs/corepack/commit/e561dd00bbacc5bc15a492fc36574fa0e37bff7b)) - - -### Bug Fixes - -* add path to `package.json` in error message ([#456](https://github.com/nodejs/corepack/issues/456)) ([32a93ea](https://github.com/nodejs/corepack/commit/32a93ea4f51eb7db7dc95a16c5719695edf4b53e)) -* correctly set `Dispatcher` prototype for `ProxyAgent` ([#451](https://github.com/nodejs/corepack/issues/451)) ([73d9a1e](https://github.com/nodejs/corepack/commit/73d9a1e2d2f84906bf01952f1dca8adab576b7bf)) -* download fewer metadata from npm registry ([#436](https://github.com/nodejs/corepack/issues/436)) ([082fabf](https://github.com/nodejs/corepack/commit/082fabf8b15658e69e4fb62bb854fe9aace78b70)) -* hash check when downloading Yarn Berry from npm ([#439](https://github.com/nodejs/corepack/issues/439)) ([4672162](https://github.com/nodejs/corepack/commit/467216281e1719a739d0eeea370b335adfb37b8d)) -* Incorrect authorization prefix for basic auth, and undocumented env var ([#454](https://github.com/nodejs/corepack/issues/454)) ([2d63536](https://github.com/nodejs/corepack/commit/2d63536413971d43f570deb035845aa0bd5202f0)) -* re-add support for custom registries with auth ([#397](https://github.com/nodejs/corepack/issues/397)) ([d267753](https://github.com/nodejs/corepack/commit/d2677538cdb613fcab6d2a45bb07f349bdc65c2b)) - -## [0.26.0](https://github.com/nodejs/corepack/compare/v0.25.2...v0.26.0) (2024-03-08) - - -### Features - -* Pins the package manager as it's used for the first time ([#413](https://github.com/nodejs/corepack/issues/413)) ([8b6c6d4](https://github.com/nodejs/corepack/commit/8b6c6d4b2b7a9d61ae6c33c07e12354bd5afc2ba)) -* update package manager versions ([#415](https://github.com/nodejs/corepack/issues/415)) ([e8edba7](https://github.com/nodejs/corepack/commit/e8edba771bca6fb10c855c04eee8102ffa792d58)) - - -### Bug Fixes - -* group the download prompt together ([#391](https://github.com/nodejs/corepack/issues/391)) ([00506b2](https://github.com/nodejs/corepack/commit/00506b2a15dd87ec03240578077a35b7980e00c1)) -* ignore `EROFS` errors ([#421](https://github.com/nodejs/corepack/issues/421)) ([b7ec137](https://github.com/nodejs/corepack/commit/b7ec137210efd35c3461321b6434e3e13a87d42f)) -* improve support for `COREPACK_NPM_REGISTRY` with Yarn Berry ([#396](https://github.com/nodejs/corepack/issues/396)) ([47be27c](https://github.com/nodejs/corepack/commit/47be27c9db988e10f651d23b3f53bcf55318a894)) -* Windows malicious file analysis waiting problem ([#398](https://github.com/nodejs/corepack/issues/398)) ([295a1cd](https://github.com/nodejs/corepack/commit/295a1cdb9cbbbce8434e8d82b96eb63e57c46c1a)) - -## [0.25.2](https://github.com/nodejs/corepack/compare/v0.25.1...v0.25.2) (2024-02-21) - - -### Features - -* update package manager versions ([#362](https://github.com/nodejs/corepack/issues/362)) ([1423312](https://github.com/nodejs/corepack/commit/1423312a0eb7844dcdd43ae8a63cf12dcacedb2b)) - - -### Bug Fixes - -* do not hard fail if Corepack home folder cannot be created ([#382](https://github.com/nodejs/corepack/issues/382)) ([9834f57](https://github.com/nodejs/corepack/commit/9834f5790a99ce2c6c283321bb38b02e5561b7ca)) -* do not show download prompt when downloading JSON ([#383](https://github.com/nodejs/corepack/issues/383)) ([bc137a0](https://github.com/nodejs/corepack/commit/bc137a0073c3343ce2d552b6e13bfd2a48f08351)) - -## [0.25.1](https://github.com/nodejs/corepack/compare/v0.25.0...v0.25.1) (2024-02-20) - - -### Bug Fixes - -* use valid semver range for `engines.node` ([#378](https://github.com/nodejs/corepack/issues/378)) ([f2185fe](https://github.com/nodejs/corepack/commit/f2185fefa145cc75fca082acc169f8aaef637ca2)) - -## [0.25.0](https://github.com/nodejs/corepack/compare/v0.24.1...v0.25.0) (2024-02-20) - - -### ⚠ BREAKING CHANGES - -* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351)) -* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375)) -* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365)) -* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373)) -* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360)) - -### Features - -* add `corepack cache` command ([#363](https://github.com/nodejs/corepack/issues/363)) ([f442366](https://github.com/nodejs/corepack/commit/f442366c1c00d0c3f388b757c3797504f9a6b62e)) -* add support for URL in `"packageManager"` ([#359](https://github.com/nodejs/corepack/issues/359)) ([4a8ce6d](https://github.com/nodejs/corepack/commit/4a8ce6d42f081047a341f36067696346c9f3e1ea)) -* bump Known Good Release when downloading new version ([#364](https://github.com/nodejs/corepack/issues/364)) ([a56c13b](https://github.com/nodejs/corepack/commit/a56c13bd0b1c11e50361b8b4b6f8a53571e3981a)) -* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360)) ([6b8d87f](https://github.com/nodejs/corepack/commit/6b8d87f2374f79855b24d659f2a2579d6b39f54f)) -* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351)) ([d9c70b9](https://github.com/nodejs/corepack/commit/d9c70b91f698787d693406626a73dc95cb18bc1d)) -* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373)) ([54e9510](https://github.com/nodejs/corepack/commit/54e9510cdaf6ed08c9dea1ed3999fa65116cb4c7)) -* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365)) ([fe6a307](https://github.com/nodejs/corepack/commit/fe6a3072f64efa810b90e4ee52e0b3ff14c63184)) - - -### Bug Fixes - -* remove unsafe remove of install folder ([#372](https://github.com/nodejs/corepack/issues/372)) ([65880ca](https://github.com/nodejs/corepack/commit/65880cafed5f4195f8e7656ca9af4cbcbb7682d3)) - - -### Miscellaneous Chores - -* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375)) ([9a1cb38](https://github.com/nodejs/corepack/commit/9a1cb385bba9ade8e9fbf5517c2bdff60295f9ed)) - -## [0.24.1](https://github.com/nodejs/corepack/compare/v0.24.0...v0.24.1) (2024-01-13) - - -### Features - -* update package manager versions ([#348](https://github.com/nodejs/corepack/issues/348)) ([cc3ada7](https://github.com/nodejs/corepack/commit/cc3ada73bccd0a5b0ff16834e518efa521c9eea4)) - - -### Bug Fixes - -* **use:** create `package.json` when calling `corepack use` on empty dir ([#350](https://github.com/nodejs/corepack/issues/350)) ([2950a8a](https://github.com/nodejs/corepack/commit/2950a8a30b64b4598abc354e45400e83d56e541b)) - -## [0.24.0](https://github.com/nodejs/corepack/compare/v0.23.0...v0.24.0) (2023-12-29) - - -### Features - -* add support for HTTP redirect ([#341](https://github.com/nodejs/corepack/issues/341)) ([6df5063](https://github.com/nodejs/corepack/commit/6df5063b14868ff21499a051e5122fa7211be6ed)) -* add support for rangeless commands ([#338](https://github.com/nodejs/corepack/issues/338)) ([9bee415](https://github.com/nodejs/corepack/commit/9bee4150815113d97f0bd77d62c8d999cfd68ad3)) -* update package manager versions ([#330](https://github.com/nodejs/corepack/issues/330)) ([cfcc280](https://github.com/nodejs/corepack/commit/cfcc28047a788daeef2c0b15ee35a8b1a8149bb6)) -* **yarn:** fallback to npm when `COREPACK_NPM_REGISTRY` is set ([#339](https://github.com/nodejs/corepack/issues/339)) ([0717c6a](https://github.com/nodejs/corepack/commit/0717c6af898e075f57c5694d699a3c51e79a024c)) - - -### Bug Fixes - -* clarify `EACCES` errors ([#343](https://github.com/nodejs/corepack/issues/343)) ([518bed8](https://github.com/nodejs/corepack/commit/518bed8b7d7c313163c79d31cb9bbc023dba6560)) - -## [0.23.0](https://github.com/nodejs/corepack/compare/v0.22.0...v0.23.0) (2023-11-05) - - -### Features - -* update package manager versions ([#325](https://github.com/nodejs/corepack/issues/325)) ([450cd33](https://github.com/nodejs/corepack/commit/450cd332d00d3428f49ed09a4235bd12139931c9)) - -## [0.22.0](https://github.com/nodejs/corepack/compare/v0.21.0...v0.22.0) (2023-10-21) - - -### Features - -* allow fallback to application/json for custom registries ([#314](https://github.com/nodejs/corepack/issues/314)) ([92f8e71](https://github.com/nodejs/corepack/commit/92f8e71f8c97c44f404ce9b7df8787a4292e6830)) -* update package manager versions ([#318](https://github.com/nodejs/corepack/issues/318)) ([0bd2577](https://github.com/nodejs/corepack/commit/0bd2577bb4c6c3a5a33ecdb3b6ca2ff244c54f28)) - -## [0.21.0](https://github.com/nodejs/corepack/compare/v0.20.0...v0.21.0) (2023-10-08) - - -### ⚠ BREAKING CHANGES - -* remove support for Node.js 16.x - -### Features - -* update package manager versions ([#297](https://github.com/nodejs/corepack/issues/297)) ([503e135](https://github.com/nodejs/corepack/commit/503e135878935cc881ebd94b48d5eca94ec4c27b)) - - -### Miscellaneous Chores - -* update supported Node.js versions ([#309](https://github.com/nodejs/corepack/issues/309)) ([787e24d](https://github.com/nodejs/corepack/commit/787e24df609513702eafcd8c6a5f03544d7d45cc)) - -## [0.20.0](https://github.com/nodejs/corepack/compare/v0.19.0...v0.20.0) (2023-08-29) - - -### Features - -* refactor the CLI interface ([#291](https://github.com/nodejs/corepack/issues/291)) ([fe3e5cd](https://github.com/nodejs/corepack/commit/fe3e5cd86c45db0d87c7fdea87d57d59b0bdcb78)) -* update package manager versions ([#292](https://github.com/nodejs/corepack/issues/292)) ([be9c286](https://github.com/nodejs/corepack/commit/be9c286846443ff03081e736fdf4a0ff031fbd38)) - -## [0.19.0](https://github.com/nodejs/corepack/compare/v0.18.1...v0.19.0) (2023-06-24) - - -### Features - -* support ESM ([#270](https://github.com/nodejs/corepack/issues/270)) ([be2489c](https://github.com/nodejs/corepack/commit/be2489cd0aaabf26a019e1c089a3c8bcc329e94a)) -* update package manager versions ([#280](https://github.com/nodejs/corepack/issues/280)) ([4188f2b](https://github.com/nodejs/corepack/commit/4188f2b4671228339fe16f9f566e7bac0c2c4f6d)) - -## [0.18.1](https://github.com/nodejs/corepack/compare/v0.18.0...v0.18.1) (2023-06-13) - - -### Features - -* update package manager versions ([#272](https://github.com/nodejs/corepack/issues/272)) ([5345774](https://github.com/nodejs/corepack/commit/53457747a26a5de3debbd0d9282b338186bbd7c3)) - - -### Bug Fixes - -* disable `v8-compile-cache` when using `npm@>=9.7.0` ([#276](https://github.com/nodejs/corepack/issues/276)) ([2f3678c](https://github.com/nodejs/corepack/commit/2f3678cd7915978f4e2ce7a32cbe5db58e9d0b8d)) -* don't override `process.exitCode` ([#268](https://github.com/nodejs/corepack/issues/268)) ([17d1f3d](https://github.com/nodejs/corepack/commit/17d1f3dd41ef6127228d427fd5cca373d6c97f0f)) - -## [0.18.0](https://github.com/nodejs/corepack/compare/v0.17.2...v0.18.0) (2023-05-19) - - -### ⚠ BREAKING CHANGES - -* remove support for Node.js 14.x - -### Features - -* update package manager versions ([#256](https://github.com/nodejs/corepack/issues/256)) ([7b61ff6](https://github.com/nodejs/corepack/commit/7b61ff6bc797ec4ed50c2ba1e1f1689264cbf4fc)) - - -### Bug Fixes - -* **doc:** add a note about troubleshooting network errors ([#259](https://github.com/nodejs/corepack/issues/259)) ([aa3cbdb](https://github.com/nodejs/corepack/commit/aa3cbdb54fb21b8e0adde96dc781cdf750932843)) - - -### Miscellaneous Chores - -* update supported Node.js versions ([#258](https://github.com/nodejs/corepack/issues/258)) ([74f679d](https://github.com/nodejs/corepack/commit/74f679d8a72cc10a3720fc679b95e9bd086d95be)) - -## [0.17.2](https://github.com/nodejs/corepack/compare/v0.17.1...v0.17.2) (2023-04-07) - - -### Features - -* update package manager versions ([#249](https://github.com/nodejs/corepack/issues/249)) ([2507e9b](https://github.com/nodejs/corepack/commit/2507e9b317eacdeb939aee086de5711218ebd794)) - -## [0.17.1](https://github.com/nodejs/corepack/compare/v0.17.0...v0.17.1) (2023-03-17) - - -### Features - -* update package manager versions ([#245](https://github.com/nodejs/corepack/issues/245)) ([673f3b7](https://github.com/nodejs/corepack/commit/673f3b7f18421a49da1e2c55656666a74ce94474)) - -## [0.17.0](https://github.com/nodejs/corepack/compare/v0.16.0...v0.17.0) (2023-02-24) - - -### ⚠ BREAKING CHANGES - -* add `"exports"` to the `package.json` ([#239](https://github.com/nodejs/corepack/issues/239)) - -### Features - -* update package manager versions ([#242](https://github.com/nodejs/corepack/issues/242)) ([5141639](https://github.com/nodejs/corepack/commit/5141639af8198a343105be1e98a74f7c9e152472)) - - -### Bug Fixes - -* add `"exports"` to the `package.json` ([#239](https://github.com/nodejs/corepack/issues/239)) ([8e12d08](https://github.com/nodejs/corepack/commit/8e12d088dec171c03e90f623895a1fbf867130e6)) - -## [0.16.0](https://github.com/nodejs/corepack/compare/v0.15.3...v0.16.0) (2023-02-17) - - -### Features - -* update package manager versions ([#228](https://github.com/nodejs/corepack/issues/228)) ([bb000f9](https://github.com/nodejs/corepack/commit/bb000f9c10a1fbd85f2c15a90218d90b42473130)) -* build: migrate to ESBuild ([#229](https://github.com/nodejs/corepack/pull/229)) ([15ceb83](https://github.com/nodejs/corepack/commit/15ceb832a34a223efbe3d3f9cb792d9101a7022a)) - - -### Bug Fixes - -* npm registry override ([#219](https://github.com/nodejs/corepack/issues/219)) ([1b35362](https://github.com/nodejs/corepack/commit/1b353624e644874d9ef6c9acaf6d1254bff3015a)) - -## [0.15.3](https://github.com/nodejs/corepack/compare/v0.15.2...v0.15.3) (2022-12-30) - - -### Features - -* update package manager versions ([#215](https://github.com/nodejs/corepack/issues/215)) ([f84cfcb](https://github.com/nodejs/corepack/commit/f84cfcb00ffb985d44b6aa0b563b2b4056a8f0d0)) - -## [0.15.2](https://github.com/nodejs/corepack/compare/v0.15.1...v0.15.2) (2022-11-25) - - -### Features - -* update package manager versions ([#211](https://github.com/nodejs/corepack/issues/211)) ([c536c0c](https://github.com/nodejs/corepack/commit/c536c0c27c137c87a14487a2c2a63a1fe6bf88ec)) - -## [0.15.1](https://github.com/nodejs/corepack/compare/v0.15.0...v0.15.1) (2022-11-04) - - -### Features - -* update package manager versions ([#205](https://github.com/nodejs/corepack/issues/205)) ([5bfac11](https://github.com/nodejs/corepack/commit/5bfac11715474a4318c67fc806fd1ff4252c683a)) - -## [0.15.0](https://github.com/nodejs/corepack/compare/v0.14.2...v0.15.0) (2022-10-28) - - -### Features - -* add support for configurable registries and applicable auth options ([#186](https://github.com/nodejs/corepack/issues/186)) ([662ae90](https://github.com/nodejs/corepack/commit/662ae9057c7360cb05e9476914e611a9bf0074db)) -* update package manager versions ([#193](https://github.com/nodejs/corepack/issues/193)) ([0ec3a73](https://github.com/nodejs/corepack/commit/0ec3a7384729c5cf4ac566d91f1a4bb74e08a64f)) -* when strict checking is off, treat like transparent ([#197](https://github.com/nodejs/corepack/issues/197)) ([5eadc50](https://github.com/nodejs/corepack/commit/5eadc50192e205c60bfb1cad91854e9014a747b8)) - - -### Bug Fixes - -* **doc:** add package configuration instruction to readme ([#188](https://github.com/nodejs/corepack/issues/188)) ([0b7abb9](https://github.com/nodejs/corepack/commit/0b7abb9833d332bad97902260d31652482c274a0)) -* recreate cache folder if necessary ([#200](https://github.com/nodejs/corepack/issues/200)) ([7b5f2f9](https://github.com/nodejs/corepack/commit/7b5f2f9fcb24fe3fe517a96deaac7f32854f3124)) - -## [0.14.2](https://github.com/nodejs/corepack/compare/v0.14.1...v0.14.2) (2022-09-24) - -### Features - -* update package manager versions ([#184](https://github.com/nodejs/corepack/issues/184)) ([84ae313](https://github.com/nodejs/corepack/commit/84ae3139e4b9a86d97465e36b50beb9201fda732)) - -## [0.14.1](https://github.com/nodejs/corepack/compare/v0.14.0...v0.14.1) (2022-09-16) - - -### Features - -* update package manager versions ([#179](https://github.com/nodejs/corepack/issues/179)) ([0b88dcb](https://github.com/nodejs/corepack/commit/0b88dcbaaf190117c6f407b6632a4b3b10da8ad9)) - -## [0.14.0](https://github.com/nodejs/corepack/compare/v0.13.0...v0.14.0) (2022-09-02) - - -### Features - -* add `COREPACK_ENABLE_STRICT` env variable ([#167](https://github.com/nodejs/corepack/issues/167)) ([92b52f6](https://github.com/nodejs/corepack/commit/92b52f6b4918aff968c0942b89fc722ebf57bce2)) -* update package manager versions ([#170](https://github.com/nodejs/corepack/issues/170)) ([6f70bfc](https://github.com/nodejs/corepack/commit/6f70bfc4b6a8a57cccb1ff9cbf2f49240648f1ed)) - - -### Bug Fixes - -* handle tags including numbers in `prepare` command ([#165](https://github.com/nodejs/corepack/issues/165)) ([5a0727b](https://github.com/nodejs/corepack/commit/5a0727b43976e0dc299151876c0dde2c4a85174d)) - -## [0.13.0](https://github.com/nodejs/corepack/compare/v0.12.3...v0.13.0) (2022-08-19) - - -### Features - -* do not use `~/.node` as default value for `COREPACK_HOME` ([#152](https://github.com/nodejs/corepack/issues/152)) ([09e24cf](https://github.com/nodejs/corepack/commit/09e24cf497de27fe92668cf0a8e555f2c7e2530d)) -* download the latest version instead of a pinned one ([#134](https://github.com/nodejs/corepack/issues/134)) ([055b928](https://github.com/nodejs/corepack/commit/055b92807f711b5c8c8be6e62b8d3ce83e1ff002)) -* update package manager versions ([#163](https://github.com/nodejs/corepack/issues/163)) ([af38d5a](https://github.com/nodejs/corepack/commit/af38d5afbbc10d61265b2f4687c5cc498b059b41)) - -## [0.12.3](https://github.com/nodejs/corepack/compare/v0.12.2...v0.12.3) (2022-08-12) - - -### Features - -* update package manager versions ([#160](https://github.com/nodejs/corepack/issues/160)) ([ad092a7](https://github.com/nodejs/corepack/commit/ad092a7fb4296143fa5224c04dbd628451b3c158)) - -## [0.12.2](https://github.com/nodejs/corepack/compare/v0.12.1...v0.12.2) (2022-08-05) - -### Features - -* update package manager versions ([#154](https://github.com/nodejs/corepack/issues/154)) ([4b95fd3](https://github.com/nodejs/corepack/commit/4b95fd3b926659855970a887c893c10db0b98e5d)) - -## [0.12.1](https://github.com/nodejs/corepack/compare/v0.12.0...v0.12.1) (2022-07-21) - - -### Bug Fixes - -* **doc:** update DESIGN.md s/engines.pm/packageManager/ ([#141](https://github.com/nodejs/corepack/issues/141)) ([d6039c5](https://github.com/nodejs/corepack/commit/d6039c5b16cdddb33069b9aa864854ed16d17e4e)) -* update package manager versions ([#146](https://github.com/nodejs/corepack/issues/146)) ([fdb187a](https://github.com/nodejs/corepack/commit/fdb187a640de77df9b3688623ba510bdafda8702)) - -## [0.12.0](https://github.com/nodejs/corepack/compare/v0.11.2...v0.12.0) (2022-07-09) - - -### Features - -* add support for hash checking ([#133](https://github.com/nodejs/corepack/issues/133)) ([6a480a7](https://github.com/nodejs/corepack/commit/6a480a72c2e9fc6725f2ab6dfaf4c52e4d3d2ade)) -* add support for tags and ranges in `prepare` command ([#136](https://github.com/nodejs/corepack/issues/136)) ([29da06c](https://github.com/nodejs/corepack/commit/29da06c515e917829e5ffbedb34284a6597e9d56)) -* update package manager versions ([#129](https://github.com/nodejs/corepack/issues/129)) ([2470f58](https://github.com/nodejs/corepack/commit/2470f58b74491a1301221df643c55be5adf1d349)) -* update package manager versions ([#139](https://github.com/nodejs/corepack/issues/139)) ([cd0dcad](https://github.com/nodejs/corepack/commit/cd0dcade85621199048d7ca30dfc3efce11e1f37)) - - -### Bug Fixes - -* streamline the cache exploration ([#135](https://github.com/nodejs/corepack/issues/135)) ([185da44](https://github.com/nodejs/corepack/commit/185da44078fd1ca34aec2e4e6f8a52ecffcf3c11)) - -## [0.11.2](https://github.com/nodejs/corepack/compare/v0.11.1...v0.11.2) (2022-06-13) - -### Bug Fixes - -* only set bins on pack ([#127](https://github.com/nodejs/corepack/issues/127)) ([7ae489a](https://github.com/nodejs/corepack/commit/7ae489a86c3fe584b9915f4ec57deb7c316c1a25)) - -## [0.11.1](https://github.com/nodejs/corepack/compare/v0.11.0...v0.11.1) (2022-06-12) - - -### Bug Fixes - -* **ci:** YAML formatting in publish workflow ([#124](https://github.com/nodejs/corepack/issues/124)) ([01c7d63](https://github.com/nodejs/corepack/commit/01c7d638b04a1340b3939a7985e24b586e344995)) - -## 0.11.0 (2022-06-12) - - -### Features - -* auto setup proxy for http requests ([#69](https://github.com/nodejs/corepack/issues/69)) ([876ce02](https://github.com/nodejs/corepack/commit/876ce02fe7385ea5bc896b2dc93d1fb320361c64)) - - -### Bug Fixes - -* avoid symlinks to work on Windows ([#13](https://github.com/nodejs/corepack/issues/13)) ([b56df30](https://github.com/nodejs/corepack/commit/b56df30796da9c7cb0ba5e1bb7152c81582abba6)) -* avoid using eval to get the corepack version ([#45](https://github.com/nodejs/corepack/issues/45)) ([78d94eb](https://github.com/nodejs/corepack/commit/78d94eb297444d7558e8b4395f0108c97117f8ab)) -* bin file name for pnpm >=6.0 ([#35](https://github.com/nodejs/corepack/issues/35)) ([8ff2499](https://github.com/nodejs/corepack/commit/8ff2499e831c8cf2dea604ea985d830afc8a479e)) -* generate cmd shim files ([a900b4d](https://github.com/nodejs/corepack/commit/a900b4db12fcd4d99c0a4d011b426cdc6485d323)) -* handle package managers with a bin array correctly ([#20](https://github.com/nodejs/corepack/issues/20)) ([1836d17](https://github.com/nodejs/corepack/commit/1836d17b4fc4c0164df2fe1ccaca4d2f16f6f2d1)) -* handle parallel installs ([#84](https://github.com/nodejs/corepack/issues/84)) ([5cfc6c9](https://github.com/nodejs/corepack/commit/5cfc6c9df0dbec8e4de4324be37aa0a54a300552)) -* handle prereleases ([#32](https://github.com/nodejs/corepack/issues/32)) ([2a46b6d](https://github.com/nodejs/corepack/commit/2a46b6d13adae139141012254ef670d6ddcb5d11)) - - -### Performance Improvements - -* load binaries in the same process ([#97](https://github.com/nodejs/corepack/issues/97)) ([5ff6e82](https://github.com/nodejs/corepack/commit/5ff6e82028e58448ba5ba986854b61ecdc69885b)) diff --git a/node_modules/corepack/LICENSE.md b/node_modules/corepack/LICENSE.md deleted file mode 100644 index 965ccaa1ae..0000000000 --- a/node_modules/corepack/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -**Copyright © Corepack contributors** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/corepack/README.md b/node_modules/corepack/README.md deleted file mode 100644 index 7ddf1de400..0000000000 --- a/node_modules/corepack/README.md +++ /dev/null @@ -1,381 +0,0 @@ -# corepack - -[![Join us on OpenJS slack (channel #nodejs-corepack)](https://img.shields.io/badge/OpenJS%20Slack-%23nodejs--corepack-blue)](https://slack-invite.openjsf.org/) - -Corepack is a zero-runtime-dependency Node.js script that acts as a bridge -between Node.js projects and the package managers they are intended to be used -with during development. In practical terms, **Corepack lets you use Yarn, npm, -and pnpm without having to install them**. - -## How to Install - -### Default Installs - -Corepack is distributed with Node.js from version 14.19.0 up to (but not including) 25.0.0. -Run `corepack enable` to install the required Yarn and pnpm binaries on your path. - -### Manual Installs - -

-Install Corepack using npm - -First uninstall your global Yarn and pnpm binaries (just leave npm). In general, -you'd do this by running the following command: - -```shell -npm uninstall -g yarn pnpm - -# That should be enough, but if you installed Yarn without going through npm it might -# be more tedious - for example, you might need to run `brew uninstall yarn` as well. -``` - -Then install Corepack: - -```shell -npm install -g corepack -``` - -We do acknowledge the irony and overhead of using npm to install Corepack, which -is at least part of why the preferred option is to use the Corepack version that -is distributed along with Node.js itself. - -
- -
Update Corepack using npm - -To install the latest version of Corepack, use: - -```shell -npm install -g corepack@latest -``` - -If Corepack was installed on your system using a Node.js Windows Installer -`.msi` package then you might need to remove it before attempting to install a -different version of Corepack using npm. You can select the Modify option of the -Node.js app settings to access the Windows Installer feature selection, and on -the "corepack manager" feature of the Node.js `.msi` package by selecting -"Entire feature will be unavailable". See -[Repair apps and programs in Windows](https://support.microsoft.com/en-us/windows/repair-apps-and-programs-in-windows-e90eefe4-d0a2-7c1b-dd59-949a9030f317) -for instructions on accessing the Windows apps page to modify settings. - -
- -
Install Corepack from source - -See [`CONTRIBUTING.md`](./CONTRIBUTING.md). - -
- -## Usage - -### When Building Packages - -Just use your package managers as you usually would. Run `yarn install` in Yarn -projects, `pnpm install` in pnpm projects, and `npm` in npm projects. Corepack -will catch these calls, and depending on the situation: - -- **If the local project is configured for the package manager you're using**, - Corepack will download and cache the latest compatible version. - -- **If the local project is configured for a different package manager**, - Corepack will request you to run the command again using the right package - manager - thus avoiding corruptions of your install artifacts. - -- **If the local project isn't configured for any package manager**, Corepack - will assume that you know what you're doing, and will use whatever package - manager version has been pinned as "known good release". Check the relevant - section for more details. - -### When Authoring Packages - -Set your package's manager with the `packageManager` field in `package.json`: - -```json -{ - "packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" -} -``` - -Here, `yarn` is the name of the package manager, specified at version `3.2.3`, -along with the SHA-224 hash of this version for validation. -`packageManager@x.y.z` is required. The hash is optional but strongly -recommended as a security practice. Permitted values for the package manager are -`yarn`, `npm`, and `pnpm`. - -You can also provide a URL to a `.js` file (which will be interpreted as a -CommonJS module) or a `.tgz` file (which will be interpreted as a package, and -the `"bin"` field of the `package.json` will be used to determine which file to -use in the archive). - -```json -{ - "packageManager": "yarn@https://registry.npmjs.org/@yarnpkg/cli-dist/-/cli-dist-3.2.3.tgz#sha224.16a0797d1710d1fb7ec40ab5c3801b68370a612a9b66ba117ad9924b" -} -``` - -#### `devEngines.packageManager` - -When a `devEngines.packageManager` field is defined, and is an object containing -a `"name"` field (can also optionally contain `version` and `onFail` fields), -Corepack will use it to validate you're using a compatible package manager. - -Depending on the value of `devEngines.packageManager.onFail`: - -- if set to `ignore`, Corepack won't print any warning or error. -- if unset or set to `error`, Corepack will throw an error in case of a mismatch. -- if set to `warn` or some other value, Corepack will print a warning in case - of mismatch. - -If the top-level `packageManager` field is missing, Corepack will use the -package manager defined in `devEngines.packageManager` – in which case you must -provide a specific version in `devEngines.packageManager.version`, ideally with -a hash, as explained in the previous section: - -```json -{ - "devEngines":{ - "packageManager": { - "name": "yarn", - "version": "3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" - } - } -} -``` - -## Known Good Releases - -When running Corepack within projects that don't list a supported package -manager, it will default to a set of Known Good Releases. - -If there is no Known Good Release for the requested package manager, Corepack -looks up the npm registry for the latest available version and cache it for -future use. - -The Known Good Releases can be updated system-wide using `corepack install -g`. -When Corepack downloads a new version of a given package manager on the same -major line as the Known Good Release, it auto-updates it by default. - -## Offline Workflow - -The utility commands detailed in the next section. - -- Either you can use the network while building your container image, in which - case you'll simply run `corepack pack` to make sure that your image - includes the Last Known Good release for the specified package manager. - -- Or you're publishing your project to a system where the network is - unavailable, in which case you'll preemptively generate a package manager - archive from your local computer (using `corepack pack -o`) before storing - it somewhere your container will be able to access (for example within your - repository). After that it'll just be a matter of running - `corepack install -g --cache-only ` to setup the cache. - -## Utility Commands - -### `corepack [@] [... args]` - -This meta-command runs the specified package manager in the local folder. You -can use it to force an install to run with a given version, which can be useful -when looking for regressions. - -Note that those commands still check whether the local project is configured for -the given package manager (ie you won't be able to run `corepack yarn install` -on a project where the `packageManager` field references `pnpm`). - -### `corepack cache clean` - -Clears the local `COREPACK_HOME` cache directory. - -### `corepack cache clear` - -Clears the local `COREPACK_HOME` cache directory. - -### `corepack enable [... name]` - -| Option | Description | -| --------------------- | --------------------------------------- | -| `--install-directory` | Add the shims to the specified location | - -This command will detect where Corepack is installed and will create shims next -to it for each of the specified package managers (or all of them if the command -is called without parameters). Note that the npm shims will not be installed -unless explicitly requested, as npm is currently distributed with Node.js -through other means. - -If the file system where the `corepack` binary is located is read-only, this -command will fail. A workaround is to add the binaries as alias in your -shell configuration file (e.g. in `~/.bash_aliases`): - -```sh -alias yarn="corepack yarn" -alias yarnpkg="corepack yarnpkg" -alias pnpm="corepack pnpm" -alias pnpx="corepack pnpx" -alias npm="corepack npm" -alias npx="corepack npx" -``` - -On Windows PowerShell, you can add functions using the `$PROFILE` automatic -variable: - -```powershell -echo "function yarn { corepack yarn `$args }" >> $PROFILE -echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE -echo "function pnpm { corepack pnpm `$args }" >> $PROFILE -echo "function pnpx { corepack pnpx `$args }" >> $PROFILE -echo "function npm { corepack npm `$args }" >> $PROFILE -echo "function npx { corepack npx `$args }" >> $PROFILE -``` - -### `corepack disable [... name]` - -| Option | Description | -| --------------------- | ------------------------------------------ | -| `--install-directory` | Remove the shims to the specified location | - -This command will detect where Node.js is installed and will remove the shims -from there. - -### `corepack install` - -Download and install the package manager configured in the local project. -This command doesn't change the global version used when running the package -manager from outside the project (use the \`-g,--global\` flag if you wish -to do this). - -### `corepack install <-g,--global> [... name[@]]` - -Install the selected package managers and install them on the system. - -Package managers thus installed will be configured as the new default when -calling their respective binaries outside of projects defining the -`packageManager` field. - -### `corepack pack [... name[@]]` - -| Option | Description | -| --------------------- | ------------------------------------------ | -| `--json ` | Print the output folder rather than logs | -| `-o,--output ` | Path where to generate the archive | - -Download the selected package managers and store them inside a tarball -suitable for use with `corepack install -g`. - -### `corepack use ]>` - -When run, this command will retrieve the latest release matching the provided -descriptor, assign it to the project's package.json file, and automatically -perform an install. - -### `corepack up` - -Retrieve the latest available version for the current major release line of -the package manager used in the local project, and update the project to use -it. - -Unlike `corepack use` this command doesn't take a package manager name nor a -version range, as it will always select the latest available version from the -range specified in `devEngines.packageManager.version`, or fallback to the -same major line. Should you need to upgrade to a new major, use an explicit -`corepack use {name}@latest` call (or simply `corepack use {name}`). - -## Environment Variables - -- `COREPACK_DEFAULT_TO_LATEST` can be set to `0` in order to instruct Corepack - not to lookup on the remote registry for the latest version of the selected - package manager, and to not update the Last Known Good version when it - downloads a new version of the same major line. - -- `COREPACK_ENABLE_AUTO_PIN` can be set to `1` to instruct Corepack to - update the `packageManager` field when it detects that the local package - doesn't list it. In general we recommend to always list a `packageManager` - field (which you can easily set through `corepack use [name]@[version]`), as - it ensures that your project installs are always deterministic. - -- `COREPACK_ENABLE_DOWNLOAD_PROMPT` can be set to `0` to - prevent Corepack showing the URL when it needs to download software, or can be - set to `1` to have the URL shown. By default, when Corepack is called - explicitly (e.g. `corepack pnpm …`), it is set to `0`; when Corepack is called - implicitly (e.g. `pnpm …`), it is set to `1`. - The default value cannot be overridden in a `.corepack.env` file. - When standard input is a TTY and no CI environment is detected, Corepack will - ask for user input before starting the download. - -- `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS` can be set to `1` to allow use of - custom URLs to load a package manager known by Corepack (`yarn`, `npm`, and - `pnpm`). - -- `COREPACK_ENABLE_NETWORK` can be set to `0` to prevent Corepack from accessing - the network (in which case you'll be responsible for hydrating the package - manager versions that will be required for the projects you'll run, using - `corepack install -g --cache-only`). - -- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing - error if the package manager does not correspond to the one defined for the - current project. This means that if a user is using the package manager - specified in the current project, it will use the version specified by the - project's `packageManager` field. But if the user is using other package - manager different from the one specified for the current project, it will use - the system-wide package manager version. - -- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from - checking if the package manager corresponds to the one defined for the current - project. This means that it will always use the system-wide package manager - regardless of what is being specified in the project's `packageManager` field. - -- `COREPACK_ENV_FILE` can be set to `0` to request Corepack to not attempt to - load `.corepack.env`; it can be set to a path to specify a different env file. - Only keys that start with `COREPACK_` and are not in the exception list - (`COREPACK_ENABLE_DOWNLOAD_PROMPT` and `COREPACK_ENV_FILE` are ignored) - will be taken into account. - For Node.js 18.x users, this setting has no effect as that version doesn't - support parsing of `.env` files. - -- `COREPACK_HOME` can be set in order to define where Corepack should install - the package managers. By default it is set to `%LOCALAPPDATA%\node\corepack` - on Windows, and to `$HOME/.cache/node/corepack` everywhere else. - -- `COREPACK_ROOT` has no functional impact on Corepack itself; it's - automatically being set in your environment by Corepack when it shells out to - the underlying package managers, so that they can feature-detect its presence - (useful for commands like `yarn init`). - -- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving - package managers from npm. Default value is `https://registry.npmjs.org` - -- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting - to a npm type registry. - -- `COREPACK_NPM_USERNAME` and `COREPACK_NPM_PASSWORD` to set a Basic - authorization header when connecting to a npm type registry. Note that both - environment variables are required and as plain text. If you want to send an - empty password, explicitly set `COREPACK_NPM_PASSWORD` to an empty string. - -- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through - [`proxy-from-env`](https://github.com/Rob--W/proxy-from-env). - -- `COREPACK_INTEGRITY_KEYS` can be set to an empty string or `0` to - instruct Corepack to skip integrity checks, or to a JSON string containing - custom keys. - -## Troubleshooting - -The environment variable `DEBUG` can be set to `corepack` to enable additional debug logging. - -### Networking - -There are a wide variety of networking issues that can occur while running -`corepack` commands. Things to check: - -- Make sure your network connection is active. -- Make sure the host for your request can be resolved by your DNS; try using - `curl [URL]` (ipv4) and `curl -6 [URL]` (ipv6) from your shell. -- Check your proxy settings (see [Environment Variables](#environment-variables)). - -## Contributing - -See [`CONTRIBUTING.md`](./CONTRIBUTING.md). - -## License (MIT) - -See [`LICENSE.md`](./LICENSE.md). diff --git a/node_modules/corepack/dist/corepack.js b/node_modules/corepack/dist/corepack.js deleted file mode 100755 index 6179b11c08..0000000000 --- a/node_modules/corepack/dist/corepack.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='0'; -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(process.argv.slice(2)); \ No newline at end of file diff --git a/node_modules/corepack/dist/lib/corepack.cjs b/node_modules/corepack/dist/lib/corepack.cjs deleted file mode 100644 index 51e21814c1..0000000000 --- a/node_modules/corepack/dist/lib/corepack.cjs +++ /dev/null @@ -1,23713 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn2, res) => function __init() { - return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res; -}; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name2 in all) - __defProp(target, name2, { get: all[name2], enumerable: true }); -}; -var __copyProps = (to, from, except, desc2) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// .yarn/cache/typanion-npm-3.14.0-8af344c436-8b03b19844.zip/node_modules/typanion/lib/index.mjs -var lib_exports = {}; -__export(lib_exports, { - KeyRelationship: () => KeyRelationship, - TypeAssertionError: () => TypeAssertionError, - applyCascade: () => applyCascade, - as: () => as, - assert: () => assert, - assertWithErrors: () => assertWithErrors, - cascade: () => cascade, - fn: () => fn, - hasAtLeastOneKey: () => hasAtLeastOneKey, - hasExactLength: () => hasExactLength, - hasForbiddenKeys: () => hasForbiddenKeys, - hasKeyRelationship: () => hasKeyRelationship, - hasMaxLength: () => hasMaxLength, - hasMinLength: () => hasMinLength, - hasMutuallyExclusiveKeys: () => hasMutuallyExclusiveKeys, - hasRequiredKeys: () => hasRequiredKeys, - hasUniqueItems: () => hasUniqueItems, - isArray: () => isArray, - isAtLeast: () => isAtLeast, - isAtMost: () => isAtMost, - isBase64: () => isBase64, - isBoolean: () => isBoolean, - isDate: () => isDate, - isDict: () => isDict, - isEnum: () => isEnum, - isHexColor: () => isHexColor, - isISO8601: () => isISO8601, - isInExclusiveRange: () => isInExclusiveRange, - isInInclusiveRange: () => isInInclusiveRange, - isInstanceOf: () => isInstanceOf, - isInteger: () => isInteger, - isJSON: () => isJSON, - isLiteral: () => isLiteral, - isLowerCase: () => isLowerCase, - isMap: () => isMap, - isNegative: () => isNegative, - isNullable: () => isNullable, - isNumber: () => isNumber, - isObject: () => isObject, - isOneOf: () => isOneOf, - isOptional: () => isOptional, - isPartial: () => isPartial, - isPayload: () => isPayload, - isPositive: () => isPositive, - isRecord: () => isRecord, - isSet: () => isSet, - isString: () => isString, - isTuple: () => isTuple, - isUUID4: () => isUUID4, - isUnknown: () => isUnknown, - isUpperCase: () => isUpperCase, - makeTrait: () => makeTrait, - makeValidator: () => makeValidator, - matchesRegExp: () => matchesRegExp, - softAssert: () => softAssert -}); -function getPrintable(value) { - if (value === null) - return `null`; - if (value === void 0) - return `undefined`; - if (value === ``) - return `an empty string`; - if (typeof value === "symbol") - return `<${value.toString()}>`; - if (Array.isArray(value)) - return `an array`; - return JSON.stringify(value); -} -function getPrintableArray(value, conjunction) { - if (value.length === 0) - return `nothing`; - if (value.length === 1) - return getPrintable(value[0]); - const rest = value.slice(0, -1); - const trailing = value[value.length - 1]; - const separator = value.length > 2 ? `, ${conjunction} ` : ` ${conjunction} `; - return `${rest.map((value2) => getPrintable(value2)).join(`, `)}${separator}${getPrintable(trailing)}`; -} -function computeKey(state, key) { - var _a, _b, _c; - if (typeof key === `number`) { - return `${(_a = state === null || state === void 0 ? void 0 : state.p) !== null && _a !== void 0 ? _a : `.`}[${key}]`; - } else if (simpleKeyRegExp.test(key)) { - return `${(_b = state === null || state === void 0 ? void 0 : state.p) !== null && _b !== void 0 ? _b : ``}.${key}`; - } else { - return `${(_c = state === null || state === void 0 ? void 0 : state.p) !== null && _c !== void 0 ? _c : `.`}[${JSON.stringify(key)}]`; - } -} -function plural(n, singular, plural2) { - return n === 1 ? singular : plural2; -} -function pushError({ errors, p } = {}, message) { - errors === null || errors === void 0 ? void 0 : errors.push(`${p !== null && p !== void 0 ? p : `.`}: ${message}`); - return false; -} -function makeSetter(target, key) { - return (v) => { - target[key] = v; - }; -} -function makeCoercionFn(target, key) { - return (v) => { - const previous = target[key]; - target[key] = v; - return makeCoercionFn(target, key).bind(null, previous); - }; -} -function makeLazyCoercionFn(fn2, orig, generator) { - const commit = () => { - fn2(generator()); - return revert; - }; - const revert = () => { - fn2(orig); - return commit; - }; - return commit; -} -function isUnknown() { - return makeValidator({ - test: (value, state) => { - return true; - } - }); -} -function isLiteral(expected) { - return makeValidator({ - test: (value, state) => { - if (value !== expected) - return pushError(state, `Expected ${getPrintable(expected)} (got ${getPrintable(value)})`); - return true; - } - }); -} -function isString() { - return makeValidator({ - test: (value, state) => { - if (typeof value !== `string`) - return pushError(state, `Expected a string (got ${getPrintable(value)})`); - return true; - } - }); -} -function isEnum(enumSpec) { - const valuesArray = Array.isArray(enumSpec) ? enumSpec : Object.values(enumSpec); - const isAlphaNum = valuesArray.every((item) => typeof item === "string" || typeof item === "number"); - const values = new Set(valuesArray); - if (values.size === 1) - return isLiteral([...values][0]); - return makeValidator({ - test: (value, state) => { - if (!values.has(value)) { - if (isAlphaNum) { - return pushError(state, `Expected one of ${getPrintableArray(valuesArray, `or`)} (got ${getPrintable(value)})`); - } else { - return pushError(state, `Expected a valid enumeration value (got ${getPrintable(value)})`); - } - } - return true; - } - }); -} -function isBoolean() { - return makeValidator({ - test: (value, state) => { - var _a; - if (typeof value !== `boolean`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - const coercion = BOOLEAN_COERCIONS.get(value); - if (typeof coercion !== `undefined`) { - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]); - return true; - } - } - return pushError(state, `Expected a boolean (got ${getPrintable(value)})`); - } - return true; - } - }); -} -function isNumber() { - return makeValidator({ - test: (value, state) => { - var _a; - if (typeof value !== `number`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - let coercion; - if (typeof value === `string`) { - let val; - try { - val = JSON.parse(value); - } catch (_b) { - } - if (typeof val === `number`) { - if (JSON.stringify(val) === value) { - coercion = val; - } else { - return pushError(state, `Received a number that can't be safely represented by the runtime (${value})`); - } - } - } - if (typeof coercion !== `undefined`) { - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]); - return true; - } - } - return pushError(state, `Expected a number (got ${getPrintable(value)})`); - } - return true; - } - }); -} -function isPayload(spec) { - return makeValidator({ - test: (value, state) => { - var _a; - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) === `undefined`) - return pushError(state, `The isPayload predicate can only be used with coercion enabled`); - if (typeof state.coercion === `undefined`) - return pushError(state, `Unbound coercion result`); - if (typeof value !== `string`) - return pushError(state, `Expected a string (got ${getPrintable(value)})`); - let inner; - try { - inner = JSON.parse(value); - } catch (_b) { - return pushError(state, `Expected a JSON string (got ${getPrintable(value)})`); - } - const wrapper = { value: inner }; - if (!spec(inner, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(wrapper, `value`) }))) - return false; - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, wrapper.value)]); - return true; - } - }); -} -function isDate() { - return makeValidator({ - test: (value, state) => { - var _a; - if (!(value instanceof Date)) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - let coercion; - if (typeof value === `string` && iso8601RegExp.test(value)) { - coercion = new Date(value); - } else { - let timestamp; - if (typeof value === `string`) { - let val; - try { - val = JSON.parse(value); - } catch (_b) { - } - if (typeof val === `number`) { - timestamp = val; - } - } else if (typeof value === `number`) { - timestamp = value; - } - if (typeof timestamp !== `undefined`) { - if (Number.isSafeInteger(timestamp) || !Number.isSafeInteger(timestamp * 1e3)) { - coercion = new Date(timestamp * 1e3); - } else { - return pushError(state, `Received a timestamp that can't be safely represented by the runtime (${value})`); - } - } - } - if (typeof coercion !== `undefined`) { - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]); - return true; - } - } - return pushError(state, `Expected a date (got ${getPrintable(value)})`); - } - return true; - } - }); -} -function isArray(spec, { delimiter } = {}) { - return makeValidator({ - test: (value, state) => { - var _a; - const originalValue = value; - if (typeof value === `string` && typeof delimiter !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - value = value.split(delimiter); - } - } - if (!Array.isArray(value)) - return pushError(state, `Expected an array (got ${getPrintable(value)})`); - let valid = true; - for (let t = 0, T = value.length; t < T; ++t) { - valid = spec(value[t], Object.assign(Object.assign({}, state), { p: computeKey(state, t), coercion: makeCoercionFn(value, t) })) && valid; - if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { - break; - } - } - if (value !== originalValue) - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]); - return valid; - } - }); -} -function isSet(spec, { delimiter } = {}) { - const isArrayValidator = isArray(spec, { delimiter }); - return makeValidator({ - test: (value, state) => { - var _a, _b; - if (Object.getPrototypeOf(value).toString() === `[object Set]`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - const originalValues = [...value]; - const coercedValues = [...value]; - if (!isArrayValidator(coercedValues, Object.assign(Object.assign({}, state), { coercion: void 0 }))) - return false; - const updateValue = () => coercedValues.some((val, t) => val !== originalValues[t]) ? new Set(coercedValues) : value; - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, makeLazyCoercionFn(state.coercion, value, updateValue)]); - return true; - } else { - let valid = true; - for (const subValue of value) { - valid = spec(subValue, Object.assign({}, state)) && valid; - if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { - break; - } - } - return valid; - } - } - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - const store = { value }; - if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(store, `value`) }))) - return false; - state.coercions.push([(_b = state.p) !== null && _b !== void 0 ? _b : `.`, makeLazyCoercionFn(state.coercion, value, () => new Set(store.value))]); - return true; - } - return pushError(state, `Expected a set (got ${getPrintable(value)})`); - } - }); -} -function isMap(keySpec, valueSpec) { - const isArrayValidator = isArray(isTuple([keySpec, valueSpec])); - const isRecordValidator = isRecord(valueSpec, { keys: keySpec }); - return makeValidator({ - test: (value, state) => { - var _a, _b, _c; - if (Object.getPrototypeOf(value).toString() === `[object Map]`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - const originalValues = [...value]; - const coercedValues = [...value]; - if (!isArrayValidator(coercedValues, Object.assign(Object.assign({}, state), { coercion: void 0 }))) - return false; - const updateValue = () => coercedValues.some((val, t) => val[0] !== originalValues[t][0] || val[1] !== originalValues[t][1]) ? new Map(coercedValues) : value; - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, makeLazyCoercionFn(state.coercion, value, updateValue)]); - return true; - } else { - let valid = true; - for (const [key, subValue] of value) { - valid = keySpec(key, Object.assign({}, state)) && valid; - if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { - break; - } - valid = valueSpec(subValue, Object.assign(Object.assign({}, state), { p: computeKey(state, key) })) && valid; - if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { - break; - } - } - return valid; - } - } - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - const store = { value }; - if (Array.isArray(value)) { - if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: void 0 }))) - return false; - state.coercions.push([(_b = state.p) !== null && _b !== void 0 ? _b : `.`, makeLazyCoercionFn(state.coercion, value, () => new Map(store.value))]); - return true; - } else { - if (!isRecordValidator(value, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(store, `value`) }))) - return false; - state.coercions.push([(_c = state.p) !== null && _c !== void 0 ? _c : `.`, makeLazyCoercionFn(state.coercion, value, () => new Map(Object.entries(store.value)))]); - return true; - } - } - return pushError(state, `Expected a map (got ${getPrintable(value)})`); - } - }); -} -function isTuple(spec, { delimiter } = {}) { - const lengthValidator = hasExactLength(spec.length); - return makeValidator({ - test: (value, state) => { - var _a; - if (typeof value === `string` && typeof delimiter !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - value = value.split(delimiter); - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]); - } - } - if (!Array.isArray(value)) - return pushError(state, `Expected a tuple (got ${getPrintable(value)})`); - let valid = lengthValidator(value, Object.assign({}, state)); - for (let t = 0, T = value.length; t < T && t < spec.length; ++t) { - valid = spec[t](value[t], Object.assign(Object.assign({}, state), { p: computeKey(state, t), coercion: makeCoercionFn(value, t) })) && valid; - if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { - break; - } - } - return valid; - } - }); -} -function isRecord(spec, { keys: keySpec = null } = {}) { - const isArrayValidator = isArray(isTuple([keySpec !== null && keySpec !== void 0 ? keySpec : isString(), spec])); - return makeValidator({ - test: (value, state) => { - var _a; - if (Array.isArray(value)) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: void 0 }))) - return false; - value = Object.fromEntries(value); - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]); - return true; - } - } - if (typeof value !== `object` || value === null) - return pushError(state, `Expected an object (got ${getPrintable(value)})`); - const keys = Object.keys(value); - let valid = true; - for (let t = 0, T = keys.length; t < T && (valid || (state === null || state === void 0 ? void 0 : state.errors) != null); ++t) { - const key = keys[t]; - const sub = value[key]; - if (key === `__proto__` || key === `constructor`) { - valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Unsafe property name`); - continue; - } - if (keySpec !== null && !keySpec(key, state)) { - valid = false; - continue; - } - if (!spec(sub, Object.assign(Object.assign({}, state), { p: computeKey(state, key), coercion: makeCoercionFn(value, key) }))) { - valid = false; - continue; - } - } - return valid; - } - }); -} -function isDict(spec, opts = {}) { - return isRecord(spec, opts); -} -function isObject(props, { extra: extraSpec = null } = {}) { - const specKeys = Object.keys(props); - const validator = makeValidator({ - test: (value, state) => { - if (typeof value !== `object` || value === null) - return pushError(state, `Expected an object (got ${getPrintable(value)})`); - const keys = /* @__PURE__ */ new Set([...specKeys, ...Object.keys(value)]); - const extra = {}; - let valid = true; - for (const key of keys) { - if (key === `constructor` || key === `__proto__`) { - valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Unsafe property name`); - } else { - const spec = Object.prototype.hasOwnProperty.call(props, key) ? props[key] : void 0; - const sub = Object.prototype.hasOwnProperty.call(value, key) ? value[key] : void 0; - if (typeof spec !== `undefined`) { - valid = spec(sub, Object.assign(Object.assign({}, state), { p: computeKey(state, key), coercion: makeCoercionFn(value, key) })) && valid; - } else if (extraSpec === null) { - valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Extraneous property (got ${getPrintable(sub)})`); - } else { - Object.defineProperty(extra, key, { - enumerable: true, - get: () => sub, - set: makeSetter(value, key) - }); - } - } - if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) { - break; - } - } - if (extraSpec !== null && (valid || (state === null || state === void 0 ? void 0 : state.errors) != null)) - valid = extraSpec(extra, state) && valid; - return valid; - } - }); - return Object.assign(validator, { - properties: props - }); -} -function isPartial(props) { - return isObject(props, { extra: isRecord(isUnknown()) }); -} -function makeTrait(value) { - return () => { - return value; - }; -} -function makeValidator({ test }) { - return makeTrait(test)(); -} -function assert(val, validator) { - if (!validator(val)) { - throw new TypeAssertionError(); - } -} -function assertWithErrors(val, validator) { - const errors = []; - if (!validator(val, { errors })) { - throw new TypeAssertionError({ errors }); - } -} -function softAssert(val, validator) { -} -function as(value, validator, { coerce = false, errors: storeErrors, throw: throws } = {}) { - const errors = storeErrors ? [] : void 0; - if (!coerce) { - if (validator(value, { errors })) { - return throws ? value : { value, errors: void 0 }; - } else if (!throws) { - return { value: void 0, errors: errors !== null && errors !== void 0 ? errors : true }; - } else { - throw new TypeAssertionError({ errors }); - } - } - const state = { value }; - const coercion = makeCoercionFn(state, `value`); - const coercions = []; - if (!validator(value, { errors, coercion, coercions })) { - if (!throws) { - return { value: void 0, errors: errors !== null && errors !== void 0 ? errors : true }; - } else { - throw new TypeAssertionError({ errors }); - } - } - for (const [, apply] of coercions) - apply(); - if (throws) { - return state.value; - } else { - return { value: state.value, errors: void 0 }; - } -} -function fn(validators, fn2) { - const isValidArgList = isTuple(validators); - return ((...args) => { - const check = isValidArgList(args); - if (!check) - throw new TypeAssertionError(); - return fn2(...args); - }); -} -function hasMinLength(length) { - return makeValidator({ - test: (value, state) => { - if (!(value.length >= length)) - return pushError(state, `Expected to have a length of at least ${length} elements (got ${value.length})`); - return true; - } - }); -} -function hasMaxLength(length) { - return makeValidator({ - test: (value, state) => { - if (!(value.length <= length)) - return pushError(state, `Expected to have a length of at most ${length} elements (got ${value.length})`); - return true; - } - }); -} -function hasExactLength(length) { - return makeValidator({ - test: (value, state) => { - if (!(value.length === length)) - return pushError(state, `Expected to have a length of exactly ${length} elements (got ${value.length})`); - return true; - } - }); -} -function hasUniqueItems({ map } = {}) { - return makeValidator({ - test: (value, state) => { - const set = /* @__PURE__ */ new Set(); - const dup = /* @__PURE__ */ new Set(); - for (let t = 0, T = value.length; t < T; ++t) { - const sub = value[t]; - const key = typeof map !== `undefined` ? map(sub) : sub; - if (set.has(key)) { - if (dup.has(key)) - continue; - pushError(state, `Expected to contain unique elements; got a duplicate with ${getPrintable(value)}`); - dup.add(key); - } else { - set.add(key); - } - } - return dup.size === 0; - } - }); -} -function isNegative() { - return makeValidator({ - test: (value, state) => { - if (!(value <= 0)) - return pushError(state, `Expected to be negative (got ${value})`); - return true; - } - }); -} -function isPositive() { - return makeValidator({ - test: (value, state) => { - if (!(value >= 0)) - return pushError(state, `Expected to be positive (got ${value})`); - return true; - } - }); -} -function isAtLeast(n) { - return makeValidator({ - test: (value, state) => { - if (!(value >= n)) - return pushError(state, `Expected to be at least ${n} (got ${value})`); - return true; - } - }); -} -function isAtMost(n) { - return makeValidator({ - test: (value, state) => { - if (!(value <= n)) - return pushError(state, `Expected to be at most ${n} (got ${value})`); - return true; - } - }); -} -function isInInclusiveRange(a, b) { - return makeValidator({ - test: (value, state) => { - if (!(value >= a && value <= b)) - return pushError(state, `Expected to be in the [${a}; ${b}] range (got ${value})`); - return true; - } - }); -} -function isInExclusiveRange(a, b) { - return makeValidator({ - test: (value, state) => { - if (!(value >= a && value < b)) - return pushError(state, `Expected to be in the [${a}; ${b}[ range (got ${value})`); - return true; - } - }); -} -function isInteger({ unsafe = false } = {}) { - return makeValidator({ - test: (value, state) => { - if (value !== Math.round(value)) - return pushError(state, `Expected to be an integer (got ${value})`); - if (!unsafe && !Number.isSafeInteger(value)) - return pushError(state, `Expected to be a safe integer (got ${value})`); - return true; - } - }); -} -function matchesRegExp(regExp) { - return makeValidator({ - test: (value, state) => { - if (!regExp.test(value)) - return pushError(state, `Expected to match the pattern ${regExp.toString()} (got ${getPrintable(value)})`); - return true; - } - }); -} -function isLowerCase() { - return makeValidator({ - test: (value, state) => { - if (value !== value.toLowerCase()) - return pushError(state, `Expected to be all-lowercase (got ${value})`); - return true; - } - }); -} -function isUpperCase() { - return makeValidator({ - test: (value, state) => { - if (value !== value.toUpperCase()) - return pushError(state, `Expected to be all-uppercase (got ${value})`); - return true; - } - }); -} -function isUUID4() { - return makeValidator({ - test: (value, state) => { - if (!uuid4RegExp.test(value)) - return pushError(state, `Expected to be a valid UUID v4 (got ${getPrintable(value)})`); - return true; - } - }); -} -function isISO8601() { - return makeValidator({ - test: (value, state) => { - if (!iso8601RegExp.test(value)) - return pushError(state, `Expected to be a valid ISO 8601 date string (got ${getPrintable(value)})`); - return true; - } - }); -} -function isHexColor({ alpha = false }) { - return makeValidator({ - test: (value, state) => { - const res = alpha ? colorStringRegExp.test(value) : colorStringAlphaRegExp.test(value); - if (!res) - return pushError(state, `Expected to be a valid hexadecimal color string (got ${getPrintable(value)})`); - return true; - } - }); -} -function isBase64() { - return makeValidator({ - test: (value, state) => { - if (!base64RegExp.test(value)) - return pushError(state, `Expected to be a valid base 64 string (got ${getPrintable(value)})`); - return true; - } - }); -} -function isJSON(spec = isUnknown()) { - return makeValidator({ - test: (value, state) => { - let data; - try { - data = JSON.parse(value); - } catch (_a) { - return pushError(state, `Expected to be a valid JSON string (got ${getPrintable(value)})`); - } - return spec(data, state); - } - }); -} -function cascade(spec, ...followups) { - const resolvedFollowups = Array.isArray(followups[0]) ? followups[0] : followups; - return makeValidator({ - test: (value, state) => { - var _a, _b; - const context = { value }; - const subCoercion = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? makeCoercionFn(context, `value`) : void 0; - const subCoercions = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? [] : void 0; - if (!spec(value, Object.assign(Object.assign({}, state), { coercion: subCoercion, coercions: subCoercions }))) - return false; - const reverts = []; - if (typeof subCoercions !== `undefined`) - for (const [, coercion] of subCoercions) - reverts.push(coercion()); - try { - if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) { - if (context.value !== value) { - if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`) - return pushError(state, `Unbound coercion result`); - state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, context.value)]); - } - (_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions); - } - return resolvedFollowups.every((spec2) => { - return spec2(context.value, state); - }); - } finally { - for (const revert of reverts) { - revert(); - } - } - } - }); -} -function applyCascade(spec, ...followups) { - const resolvedFollowups = Array.isArray(followups[0]) ? followups[0] : followups; - return cascade(spec, resolvedFollowups); -} -function isOptional(spec) { - return makeValidator({ - test: (value, state) => { - if (typeof value === `undefined`) - return true; - return spec(value, state); - } - }); -} -function isNullable(spec) { - return makeValidator({ - test: (value, state) => { - if (value === null) - return true; - return spec(value, state); - } - }); -} -function hasRequiredKeys(requiredKeys, options) { - var _a; - const requiredSet = new Set(requiredKeys); - const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; - return makeValidator({ - test: (value, state) => { - const keys = new Set(Object.keys(value)); - const problems = []; - for (const key of requiredSet) - if (!check(keys, key, value)) - problems.push(key); - if (problems.length > 0) - return pushError(state, `Missing required ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, `and`)}`); - return true; - } - }); -} -function hasAtLeastOneKey(requiredKeys, options) { - var _a; - const requiredSet = new Set(requiredKeys); - const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; - return makeValidator({ - test: (value, state) => { - const keys = Object.keys(value); - const valid = keys.some((key) => check(requiredSet, key, value)); - if (!valid) - return pushError(state, `Missing at least one property from ${getPrintableArray(Array.from(requiredSet), `or`)}`); - return true; - } - }); -} -function hasForbiddenKeys(forbiddenKeys, options) { - var _a; - const forbiddenSet = new Set(forbiddenKeys); - const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; - return makeValidator({ - test: (value, state) => { - const keys = new Set(Object.keys(value)); - const problems = []; - for (const key of forbiddenSet) - if (check(keys, key, value)) - problems.push(key); - if (problems.length > 0) - return pushError(state, `Forbidden ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, `and`)}`); - return true; - } - }); -} -function hasMutuallyExclusiveKeys(exclusiveKeys, options) { - var _a; - const exclusiveSet = new Set(exclusiveKeys); - const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"]; - return makeValidator({ - test: (value, state) => { - const keys = new Set(Object.keys(value)); - const used = []; - for (const key of exclusiveSet) - if (check(keys, key, value)) - used.push(key); - if (used.length > 1) - return pushError(state, `Mutually exclusive properties ${getPrintableArray(used, `and`)}`); - return true; - } - }); -} -function hasKeyRelationship(subject, relationship, others, options) { - var _a, _b; - const skipped = new Set((_a = options === null || options === void 0 ? void 0 : options.ignore) !== null && _a !== void 0 ? _a : []); - const check = checks[(_b = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _b !== void 0 ? _b : "missing"]; - const otherSet = new Set(others); - const spec = keyRelationships[relationship]; - const conjunction = relationship === KeyRelationship.Forbids ? `or` : `and`; - return makeValidator({ - test: (value, state) => { - const keys = new Set(Object.keys(value)); - if (!check(keys, subject, value) || skipped.has(value[subject])) - return true; - const problems = []; - for (const key of otherSet) - if ((check(keys, key, value) && !skipped.has(value[key])) !== spec.expect) - problems.push(key); - if (problems.length >= 1) - return pushError(state, `Property "${subject}" ${spec.message} ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, conjunction)}`); - return true; - } - }); -} -var simpleKeyRegExp, colorStringRegExp, colorStringAlphaRegExp, base64RegExp, uuid4RegExp, iso8601RegExp, BOOLEAN_COERCIONS, isInstanceOf, isOneOf, TypeAssertionError, checks, KeyRelationship, keyRelationships; -var init_lib = __esm({ - ".yarn/cache/typanion-npm-3.14.0-8af344c436-8b03b19844.zip/node_modules/typanion/lib/index.mjs"() { - simpleKeyRegExp = /^[a-zA-Z_][a-zA-Z0-9_]*$/; - colorStringRegExp = /^#[0-9a-f]{6}$/i; - colorStringAlphaRegExp = /^#[0-9a-f]{6}([0-9a-f]{2})?$/i; - base64RegExp = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; - uuid4RegExp = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i; - iso8601RegExp = /^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/; - BOOLEAN_COERCIONS = /* @__PURE__ */ new Map([ - [`true`, true], - [`True`, true], - [`1`, true], - [1, true], - [`false`, false], - [`False`, false], - [`0`, false], - [0, false] - ]); - isInstanceOf = (constructor) => makeValidator({ - test: (value, state) => { - if (!(value instanceof constructor)) - return pushError(state, `Expected an instance of ${constructor.name} (got ${getPrintable(value)})`); - return true; - } - }); - isOneOf = (specs, { exclusive = false } = {}) => makeValidator({ - test: (value, state) => { - var _a, _b, _c; - const matches = []; - const errorBuffer = typeof (state === null || state === void 0 ? void 0 : state.errors) !== `undefined` ? [] : void 0; - for (let t = 0, T = specs.length; t < T; ++t) { - const subErrors = typeof (state === null || state === void 0 ? void 0 : state.errors) !== `undefined` ? [] : void 0; - const subCoercions = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? [] : void 0; - if (specs[t](value, Object.assign(Object.assign({}, state), { errors: subErrors, coercions: subCoercions, p: `${(_a = state === null || state === void 0 ? void 0 : state.p) !== null && _a !== void 0 ? _a : `.`}#${t + 1}` }))) { - matches.push([`#${t + 1}`, subCoercions]); - if (!exclusive) { - break; - } - } else { - errorBuffer === null || errorBuffer === void 0 ? void 0 : errorBuffer.push(subErrors[0]); - } - } - if (matches.length === 1) { - const [, subCoercions] = matches[0]; - if (typeof subCoercions !== `undefined`) - (_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions); - return true; - } - if (matches.length > 1) - pushError(state, `Expected to match exactly a single predicate (matched ${matches.join(`, `)})`); - else - (_c = state === null || state === void 0 ? void 0 : state.errors) === null || _c === void 0 ? void 0 : _c.push(...errorBuffer); - return false; - } - }); - TypeAssertionError = class extends Error { - constructor({ errors } = {}) { - let errorMessage = `Type mismatch`; - if (errors && errors.length > 0) { - errorMessage += ` -`; - for (const error of errors) { - errorMessage += ` -- ${error}`; - } - } - super(errorMessage); - } - }; - checks = { - missing: (keys, key) => keys.has(key), - undefined: (keys, key, value) => keys.has(key) && typeof value[key] !== `undefined`, - nil: (keys, key, value) => keys.has(key) && value[key] != null, - falsy: (keys, key, value) => keys.has(key) && !!value[key] - }; - (function(KeyRelationship2) { - KeyRelationship2["Forbids"] = "Forbids"; - KeyRelationship2["Requires"] = "Requires"; - })(KeyRelationship || (KeyRelationship = {})); - keyRelationships = { - [KeyRelationship.Forbids]: { - expect: false, - message: `forbids using` - }, - [KeyRelationship.Requires]: { - expect: true, - message: `requires using` - } - }; - } -}); - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/platform/node.js -var require_node = __commonJS({ - ".yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/platform/node.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var tty2 = require("tty"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var tty__default = /* @__PURE__ */ _interopDefaultLegacy(tty2); - function getDefaultColorDepth2() { - if (tty__default["default"] && `getColorDepth` in tty__default["default"].WriteStream.prototype) - return tty__default["default"].WriteStream.prototype.getColorDepth(); - if (process.env.FORCE_COLOR === `0`) - return 1; - if (process.env.FORCE_COLOR === `1`) - return 8; - if (typeof process.stdout !== `undefined` && process.stdout.isTTY) - return 8; - return 1; - } - var gContextStorage; - function getCaptureActivator2(context) { - let contextStorage = gContextStorage; - if (typeof contextStorage === `undefined`) { - if (context.stdout === process.stdout && context.stderr === process.stderr) - return null; - const { AsyncLocalStorage: LazyAsyncLocalStorage } = require("async_hooks"); - contextStorage = gContextStorage = new LazyAsyncLocalStorage(); - const origStdoutWrite = process.stdout._write; - process.stdout._write = function(chunk, encoding, cb) { - const context2 = contextStorage.getStore(); - if (typeof context2 === `undefined`) - return origStdoutWrite.call(this, chunk, encoding, cb); - return context2.stdout.write(chunk, encoding, cb); - }; - const origStderrWrite = process.stderr._write; - process.stderr._write = function(chunk, encoding, cb) { - const context2 = contextStorage.getStore(); - if (typeof context2 === `undefined`) - return origStderrWrite.call(this, chunk, encoding, cb); - return context2.stderr.write(chunk, encoding, cb); - }; - } - return (fn2) => { - return contextStorage.run(context, fn2); - }; - } - exports2.getCaptureActivator = getCaptureActivator2; - exports2.getDefaultColorDepth = getDefaultColorDepth2; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/debug.js -var require_debug = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/debug.js"(exports2, module2) { - "use strict"; - var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { - }; - module2.exports = debug2; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/constants.js -var require_constants = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/constants.js"(exports2, module2) { - "use strict"; - var SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ - 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var RELEASE_TYPES = [ - "major", - "premajor", - "minor", - "preminor", - "patch", - "prepatch", - "prerelease" - ]; - module2.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2 - }; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/re.js -var require_re = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/re.js"(exports2, module2) { - "use strict"; - var { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH - } = require_constants(); - var debug2 = require_debug(); - exports2 = module2.exports = {}; - var re = exports2.re = []; - var safeRe = exports2.safeRe = []; - var src = exports2.src = []; - var safeSrc = exports2.safeSrc = []; - var t = exports2.t = {}; - var R = 0; - var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; - var safeRegexReplacements = [ - ["\\s", 1], - ["\\d", MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] - ]; - var makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); - } - return value; - }; - var createToken = (name2, value, isGlobal) => { - const safe = makeSafeRegex(value); - const index = R++; - debug2(name2, index, value); - t[name2] = index; - src[index] = value; - safeSrc[index] = safe; - re[index] = new RegExp(value, isGlobal ? "g" : void 0); - safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); - }; - createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); - createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); - createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); - createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); - createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); - createToken("FULL", `^${src[t.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); - createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); - createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); - createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); - createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); - createToken("COERCERTL", src[t.COERCE], true); - createToken("COERCERTLFULL", src[t.COERCEFULL], true); - createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); - exports2.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); - exports2.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); - exports2.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); - createToken("STAR", "(<|>)?=?\\s*\\*"); - createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); - createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/parse-options.js -var require_parse_options = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/parse-options.js"(exports2, module2) { - "use strict"; - var looseOption = Object.freeze({ loose: true }); - var emptyOpts = Object.freeze({}); - var parseOptions = (options) => { - if (!options) { - return emptyOpts; - } - if (typeof options !== "object") { - return looseOption; - } - return options; - }; - module2.exports = parseOptions; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/identifiers.js -var require_identifiers = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/identifiers.js"(exports2, module2) { - "use strict"; - var numeric = /^[0-9]+$/; - var compareIdentifiers = (a, b) => { - if (typeof a === "number" && typeof b === "number") { - return a === b ? 0 : a < b ? -1 : 1; - } - const anum = numeric.test(a); - const bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - }; - var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); - module2.exports = { - compareIdentifiers, - rcompareIdentifiers - }; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/semver.js -var require_semver = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/semver.js"(exports2, module2) { - "use strict"; - var debug2 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); - var { safeRe: re, t } = require_re(); - var parseOptions = require_parse_options(); - var { compareIdentifiers } = require_identifiers(); - var SemVer3 = class _SemVer { - constructor(version2, options) { - options = parseOptions(options); - if (version2 instanceof _SemVer) { - if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { - return version2; - } else { - version2 = version2.version; - } - } else if (typeof version2 !== "string") { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); - } - if (version2.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ); - } - debug2("SemVer", version2, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version2}`); - } - this.raw = version2; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); - } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); - } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); - } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; - } - } - return id; - }); - } - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - format() { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join(".")}`; - } - return this.version; - } - toString() { - return this.version; - } - compare(other) { - debug2("SemVer.compare", this.version, this.options, other); - if (!(other instanceof _SemVer)) { - if (typeof other === "string" && other === this.version) { - return 0; - } - other = new _SemVer(other, this.options); - } - if (other.version === this.version) { - return 0; - } - return this.compareMain(other) || this.comparePre(other); - } - compareMain(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - if (this.major < other.major) { - return -1; - } - if (this.major > other.major) { - return 1; - } - if (this.minor < other.minor) { - return -1; - } - if (this.minor > other.minor) { - return 1; - } - if (this.patch < other.patch) { - return -1; - } - if (this.patch > other.patch) { - return 1; - } - return 0; - } - comparePre(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; - } - let i = 0; - do { - const a = this.prerelease[i]; - const b = other.prerelease[i]; - debug2("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - compareBuild(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - let i = 0; - do { - const a = this.build[i]; - const b = other.build[i]; - debug2("build compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc(release, identifier, identifierBase) { - if (release.startsWith("pre")) { - if (!identifier && identifierBase === false) { - throw new Error("invalid increment argument: identifier is empty"); - } - if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); - if (!match || match[1] !== identifier) { - throw new Error(`invalid identifier: ${identifier}`); - } - } - } - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier, identifierBase); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier, identifierBase); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier, identifierBase); - this.inc("pre", identifier, identifierBase); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier, identifierBase); - } - this.inc("pre", identifier, identifierBase); - break; - case "release": - if (this.prerelease.length === 0) { - throw new Error(`version ${this.raw} is not a prerelease`); - } - this.prerelease.length = 0; - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case "pre": { - const base = Number(identifierBase) ? 1 : 0; - if (this.prerelease.length === 0) { - this.prerelease = [base]; - } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === "number") { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - if (identifier === this.prerelease.join(".") && identifierBase === false) { - throw new Error("invalid increment argument: identifier already exists"); - } - this.prerelease.push(base); - } - } - if (identifier) { - let prerelease = [identifier, base]; - if (identifierBase === false) { - prerelease = [identifier]; - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease; - } - } else { - this.prerelease = prerelease; - } - } - break; - } - default: - throw new Error(`invalid increment argument: ${release}`); - } - this.raw = this.format(); - if (this.build.length) { - this.raw += `+${this.build.join(".")}`; - } - return this; - } - }; - module2.exports = SemVer3; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/compare.js -var require_compare = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/compare.js"(exports2, module2) { - "use strict"; - var SemVer3 = require_semver(); - var compare = (a, b, loose) => new SemVer3(a, loose).compare(new SemVer3(b, loose)); - module2.exports = compare; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/rcompare.js -var require_rcompare = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/rcompare.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var rcompare = (a, b, loose) => compare(b, a, loose); - module2.exports = rcompare; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/parse.js -var require_parse = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/parse.js"(exports2, module2) { - "use strict"; - var SemVer3 = require_semver(); - var parse4 = (version2, options, throwErrors = false) => { - if (version2 instanceof SemVer3) { - return version2; - } - try { - return new SemVer3(version2, options); - } catch (er) { - if (!throwErrors) { - return null; - } - throw er; - } - }; - module2.exports = parse4; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/valid.js -var require_valid = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/valid.js"(exports2, module2) { - "use strict"; - var parse4 = require_parse(); - var valid = (version2, options) => { - const v = parse4(version2, options); - return v ? v.version : null; - }; - module2.exports = valid; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/lrucache.js -var require_lrucache = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/lrucache.js"(exports2, module2) { - "use strict"; - var LRUCache = class { - constructor() { - this.max = 1e3; - this.map = /* @__PURE__ */ new Map(); - } - get(key) { - const value = this.map.get(key); - if (value === void 0) { - return void 0; - } else { - this.map.delete(key); - this.map.set(key, value); - return value; - } - } - delete(key) { - return this.map.delete(key); - } - set(key, value) { - const deleted = this.delete(key); - if (!deleted && value !== void 0) { - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value; - this.delete(firstKey); - } - this.map.set(key, value); - } - return this; - } - }; - module2.exports = LRUCache; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/eq.js -var require_eq = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/eq.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var eq = (a, b, loose) => compare(a, b, loose) === 0; - module2.exports = eq; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/neq.js -var require_neq = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/neq.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var neq = (a, b, loose) => compare(a, b, loose) !== 0; - module2.exports = neq; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gt.js -var require_gt = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gt.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var gt = (a, b, loose) => compare(a, b, loose) > 0; - module2.exports = gt; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gte.js -var require_gte = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/gte.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var gte = (a, b, loose) => compare(a, b, loose) >= 0; - module2.exports = gte; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lt.js -var require_lt = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lt.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var lt = (a, b, loose) => compare(a, b, loose) < 0; - module2.exports = lt; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lte.js -var require_lte = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/lte.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var lte = (a, b, loose) => compare(a, b, loose) <= 0; - module2.exports = lte; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/cmp.js -var require_cmp = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/cmp.js"(exports2, module2) { - "use strict"; - var eq = require_eq(); - var neq = require_neq(); - var gt = require_gt(); - var gte = require_gte(); - var lt = require_lt(); - var lte = require_lte(); - var cmp = (a, op, b, loose) => { - switch (op) { - case "===": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a === b; - case "!==": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a !== b; - case "": - case "=": - case "==": - return eq(a, b, loose); - case "!=": - return neq(a, b, loose); - case ">": - return gt(a, b, loose); - case ">=": - return gte(a, b, loose); - case "<": - return lt(a, b, loose); - case "<=": - return lte(a, b, loose); - default: - throw new TypeError(`Invalid operator: ${op}`); - } - }; - module2.exports = cmp; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/comparator.js -var require_comparator = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/comparator.js"(exports2, module2) { - "use strict"; - var ANY = Symbol("SemVer ANY"); - var Comparator = class _Comparator { - static get ANY() { - return ANY; - } - constructor(comp, options) { - options = parseOptions(options); - if (comp instanceof _Comparator) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } - } - comp = comp.trim().split(/\s+/).join(" "); - debug2("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) { - this.value = ""; - } else { - this.value = this.operator + this.semver.version; - } - debug2("comp", this); - } - parse(comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - const m = comp.match(r); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`); - } - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") { - this.operator = ""; - } - if (!m[2]) { - this.semver = ANY; - } else { - this.semver = new SemVer3(m[2], this.options.loose); - } - } - toString() { - return this.value; - } - test(version2) { - debug2("Comparator.test", version2, this.options.loose); - if (this.semver === ANY || version2 === ANY) { - return true; - } - if (typeof version2 === "string") { - try { - version2 = new SemVer3(version2, this.options); - } catch (er) { - return false; - } - } - return cmp(version2, this.operator, this.semver, this.options); - } - intersects(comp, options) { - if (!(comp instanceof _Comparator)) { - throw new TypeError("a Comparator is required"); - } - if (this.operator === "") { - if (this.value === "") { - return true; - } - return new Range3(comp.value, options).test(this.value); - } else if (comp.operator === "") { - if (comp.value === "") { - return true; - } - return new Range3(this.value, options).test(comp.semver); - } - options = parseOptions(options); - if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { - return false; - } - if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { - return false; - } - if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { - return true; - } - if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { - return true; - } - if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { - return true; - } - if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { - return true; - } - if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { - return true; - } - return false; - } - }; - module2.exports = Comparator; - var parseOptions = require_parse_options(); - var { safeRe: re, t } = require_re(); - var cmp = require_cmp(); - var debug2 = require_debug(); - var SemVer3 = require_semver(); - var Range3 = require_range(); - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/range.js -var require_range = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/classes/range.js"(exports2, module2) { - "use strict"; - var SPACE_CHARACTERS = /\s+/g; - var Range3 = class _Range { - constructor(range, options) { - options = parseOptions(options); - if (range instanceof _Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; - } else { - return new _Range(range.raw, options); - } - } - if (range instanceof Comparator) { - this.raw = range.value; - this.set = [[range]]; - this.formatted = void 0; - return this; - } - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().replace(SPACE_CHARACTERS, " "); - this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`); - } - if (this.set.length > 1) { - const first = this.set[0]; - this.set = this.set.filter((c) => !isNullSet(c[0])); - if (this.set.length === 0) { - this.set = [first]; - } else if (this.set.length > 1) { - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c]; - break; - } - } - } - } - this.formatted = void 0; - } - get range() { - if (this.formatted === void 0) { - this.formatted = ""; - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += "||"; - } - const comps = this.set[i]; - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += " "; - } - this.formatted += comps[k].toString().trim(); - } - } - } - return this.formatted; - } - format() { - return this.range; - } - toString() { - return this.range; - } - parseRange(range) { - const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ":" + range; - const cached = cache2.get(memoKey); - if (cached) { - return cached; - } - const loose = this.options.loose; - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug2("hyphen replace", range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug2("comparator trim", range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - debug2("tilde trim", range); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - debug2("caret trim", range); - let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); - if (loose) { - rangeList = rangeList.filter((comp) => { - debug2("loose invalid filter", comp, this.options); - return !!comp.match(re[t.COMPARATORLOOSE]); - }); - } - debug2("range list", rangeList); - const rangeMap = /* @__PURE__ */ new Map(); - const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp]; - } - rangeMap.set(comp.value, comp); - } - if (rangeMap.size > 1 && rangeMap.has("")) { - rangeMap.delete(""); - } - const result = [...rangeMap.values()]; - cache2.set(memoKey, result); - return result; - } - intersects(range, options) { - if (!(range instanceof _Range)) { - throw new TypeError("a Range is required"); - } - return this.set.some((thisComparators) => { - return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { - return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - } - // if ANY of the sets match ALL of its comparators, then pass - test(version2) { - if (!version2) { - return false; - } - if (typeof version2 === "string") { - try { - version2 = new SemVer3(version2, this.options); - } catch (er) { - return false; - } - } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version2, this.options)) { - return true; - } - } - return false; - } - }; - module2.exports = Range3; - var LRU = require_lrucache(); - var cache2 = new LRU(); - var parseOptions = require_parse_options(); - var Comparator = require_comparator(); - var debug2 = require_debug(); - var SemVer3 = require_semver(); - var { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace - } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); - var isNullSet = (c) => c.value === "<0.0.0-0"; - var isAny = (c) => c.value === ""; - var isSatisfiable = (comparators, options) => { - let result = true; - const remainingComparators = comparators.slice(); - let testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - return result; - }; - var parseComparator = (comp, options) => { - comp = comp.replace(re[t.BUILD], ""); - debug2("comp", comp, options); - comp = replaceCarets(comp, options); - debug2("caret", comp); - comp = replaceTildes(comp, options); - debug2("tildes", comp); - comp = replaceXRanges(comp, options); - debug2("xrange", comp); - comp = replaceStars(comp, options); - debug2("stars", comp); - return comp; - }; - var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; - var replaceTildes = (comp, options) => { - return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); - }; - var replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; - return comp.replace(r, (_, M, m, p, pr) => { - debug2("tilde", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; - } else if (isX(p)) { - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; - } else if (pr) { - debug2("replaceTilde pr", pr); - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; - } - debug2("tilde return", ret); - return ret; - }); - }; - var replaceCarets = (comp, options) => { - return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); - }; - var replaceCaret = (comp, options) => { - debug2("caret", comp, options); - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; - const z = options.includePrerelease ? "-0" : ""; - return comp.replace(r, (_, M, m, p, pr) => { - debug2("caret", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - } else if (isX(p)) { - if (M === "0") { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; - } - } else if (pr) { - debug2("replaceCaret pr", pr); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; - } - } else { - debug2("no pr"); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; - } - } - debug2("caret return", ret); - return ret; - }); - }; - var replaceXRanges = (comp, options) => { - debug2("replaceXRanges", comp, options); - return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); - }; - var replaceXRange = (comp, options) => { - comp = comp.trim(); - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug2("xRange", comp, ret, gtlt, M, m, p, pr); - const xM = isX(M); - const xm = xM || isX(m); - const xp = xm || isX(p); - const anyX = xp; - if (gtlt === "=" && anyX) { - gtlt = ""; - } - pr = options.includePrerelease ? "-0" : ""; - if (xM) { - if (gtlt === ">" || gtlt === "<") { - ret = "<0.0.0-0"; - } else { - ret = "*"; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; - } - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) { - M = +M + 1; - } else { - m = +m + 1; - } - } - if (gtlt === "<") { - pr = "-0"; - } - ret = `${gtlt + M}.${m}.${p}${pr}`; - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; - } else if (xp) { - ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; - } - debug2("xRange return", ret); - return ret; - }); - }; - var replaceStars = (comp, options) => { - debug2("replaceStars", comp, options); - return comp.trim().replace(re[t.STAR], ""); - }; - var replaceGTE0 = (comp, options) => { - debug2("replaceGTE0", comp, options); - return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); - }; - var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = ""; - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? "-0" : ""}`; - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; - } else if (fpr) { - from = `>=${from}`; - } else { - from = `>=${from}${incPr ? "-0" : ""}`; - } - if (isX(tM)) { - to = ""; - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0`; - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0`; - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}`; - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0`; - } else { - to = `<=${to}`; - } - return `${from} ${to}`.trim(); - }; - var testSet = (set, version2, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version2)) { - return false; - } - } - if (version2.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set.length; i++) { - debug2(set[i].semver); - if (set[i].semver === Comparator.ANY) { - continue; - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver; - if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { - return true; - } - } - } - return false; - } - return true; - }; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/ranges/valid.js -var require_valid2 = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/ranges/valid.js"(exports2, module2) { - "use strict"; - var Range3 = require_range(); - var validRange = (range, options) => { - try { - return new Range3(range, options).range || "*"; - } catch (er) { - return null; - } - }; - module2.exports = validRange; - } -}); - -// .yarn/cache/ms-npm-2.1.3-81ff3cfac1-d924b57e73.zip/node_modules/ms/index.js -var require_ms = __commonJS({ - ".yarn/cache/ms-npm-2.1.3-81ff3cfac1-d924b57e73.zip/node_modules/ms/index.js"(exports2, module2) { - var s = 1e3; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - module2.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === "string" && val.length > 0) { - return parse4(val); - } else if (type === "number" && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) - ); - }; - function parse4(str) { - str = String(str); - if (str.length > 100) { - return; - } - 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( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || "ms").toLowerCase(); - switch (type) { - case "years": - case "year": - case "yrs": - case "yr": - case "y": - return n * y; - case "weeks": - case "week": - case "w": - return n * w; - case "days": - case "day": - case "d": - return n * d; - case "hours": - case "hour": - case "hrs": - case "hr": - case "h": - return n * h; - case "minutes": - case "minute": - case "mins": - case "min": - case "m": - return n * m; - case "seconds": - case "second": - case "secs": - case "sec": - case "s": - return n * s; - case "milliseconds": - case "millisecond": - case "msecs": - case "msec": - case "ms": - return n; - default: - return void 0; - } - } - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + "d"; - } - if (msAbs >= h) { - return Math.round(ms / h) + "h"; - } - if (msAbs >= m) { - return Math.round(ms / m) + "m"; - } - if (msAbs >= s) { - return Math.round(ms / s) + "s"; - } - return ms + "ms"; - } - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural2(ms, msAbs, d, "day"); - } - if (msAbs >= h) { - return plural2(ms, msAbs, h, "hour"); - } - if (msAbs >= m) { - return plural2(ms, msAbs, m, "minute"); - } - if (msAbs >= s) { - return plural2(ms, msAbs, s, "second"); - } - return ms + " ms"; - } - function plural2(ms, msAbs, n, name2) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : ""); - } - } -}); - -// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/common.js -var require_common = __commonJS({ - ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/common.js"(exports2, module2) { - function setup(env2) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require_ms(); - createDebug.destroy = destroy; - Object.keys(env2).forEach((key) => { - createDebug[key] = env2[key]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; - } - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug2(...args) { - if (!debug2.enabled) { - return; - } - const self2 = debug2; - const curr = Number(/* @__PURE__ */ new Date()); - const ms = curr - (prevTime || curr); - self2.diff = ms; - self2.prev = prevTime; - self2.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== "string") { - args.unshift("%O"); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - if (match === "%%") { - return "%"; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self2, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self2, args); - const logFn = self2.log || createDebug.log; - logFn.apply(self2, args); - } - debug2.namespace = namespace; - debug2.useColors = createDebug.useColors(); - debug2.color = createDebug.selectColor(namespace); - debug2.extend = extend; - debug2.destroy = createDebug.destroy; - Object.defineProperty(debug2, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - if (typeof createDebug.init === "function") { - createDebug.init(debug2); - } - return debug2; - } - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); - for (const ns of split) { - if (ns[0] === "-") { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { - if (template[templateIndex] === "*") { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; - } - } - while (templateIndex < template.length && template[templateIndex] === "*") { - templateIndex++; - } - return templateIndex === template.length; - } - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map((namespace) => "-" + namespace) - ].join(","); - createDebug.enable(""); - return namespaces; - } - function enabled(name2) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name2, skip)) { - return false; - } - } - for (const ns of createDebug.names) { - if (matchesTemplate(name2, ns)) { - return true; - } - } - return false; - } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - function destroy() { - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - createDebug.enable(createDebug.load()); - return createDebug; - } - module2.exports = setup; - } -}); - -// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/browser.js -var require_browser = __commonJS({ - ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/browser.js"(exports2, module2) { - exports2.formatArgs = formatArgs; - exports2.save = save; - exports2.load = load; - exports2.useColors = useColors; - exports2.storage = localstorage(); - exports2.destroy = /* @__PURE__ */ (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - }; - })(); - exports2.colors = [ - "#0000CC", - "#0000FF", - "#0033CC", - "#0033FF", - "#0066CC", - "#0066FF", - "#0099CC", - "#0099FF", - "#00CC00", - "#00CC33", - "#00CC66", - "#00CC99", - "#00CCCC", - "#00CCFF", - "#3300CC", - "#3300FF", - "#3333CC", - "#3333FF", - "#3366CC", - "#3366FF", - "#3399CC", - "#3399FF", - "#33CC00", - "#33CC33", - "#33CC66", - "#33CC99", - "#33CCCC", - "#33CCFF", - "#6600CC", - "#6600FF", - "#6633CC", - "#6633FF", - "#66CC00", - "#66CC33", - "#9900CC", - "#9900FF", - "#9933CC", - "#9933FF", - "#99CC00", - "#99CC33", - "#CC0000", - "#CC0033", - "#CC0066", - "#CC0099", - "#CC00CC", - "#CC00FF", - "#CC3300", - "#CC3333", - "#CC3366", - "#CC3399", - "#CC33CC", - "#CC33FF", - "#CC6600", - "#CC6633", - "#CC9900", - "#CC9933", - "#CCCC00", - "#CCCC33", - "#FF0000", - "#FF0033", - "#FF0066", - "#FF0099", - "#FF00CC", - "#FF00FF", - "#FF3300", - "#FF3333", - "#FF3366", - "#FF3399", - "#FF33CC", - "#FF33FF", - "#FF6600", - "#FF6633", - "#FF9900", - "#FF9933", - "#FFCC00", - "#FFCC33" - ]; - function useColors() { - if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { - return true; - } - if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - function formatArgs(args) { - args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); - if (!this.useColors) { - return; - } - const c = "color: " + this.color; - args.splice(1, 0, c, "color: inherit"); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { - return; - } - index++; - if (match === "%c") { - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - exports2.log = console.debug || console.log || (() => { - }); - function save(namespaces) { - try { - if (namespaces) { - exports2.storage.setItem("debug", namespaces); - } else { - exports2.storage.removeItem("debug"); - } - } catch (error) { - } - } - function load() { - let r; - try { - r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); - } catch (error) { - } - if (!r && typeof process !== "undefined" && "env" in process) { - r = process.env.DEBUG; - } - return r; - } - function localstorage() { - try { - return localStorage; - } catch (error) { - } - } - module2.exports = require_common()(exports2); - var { formatters } = module2.exports; - formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (error) { - return "[UnexpectedJSONParseError]: " + error.message; - } - }; - } -}); - -// .yarn/cache/supports-color-npm-10.2.2-e43ac15f9f-fb28dd7e0c.zip/node_modules/supports-color/index.js -var supports_color_exports = {}; -__export(supports_color_exports, { - createSupportsColor: () => createSupportsColor, - default: () => supports_color_default -}); -function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -} -function envForceColor() { - if (!("FORCE_COLOR" in env)) { - return; - } - if (env.FORCE_COLOR === "true") { - return 1; - } - if (env.FORCE_COLOR === "false") { - return 0; - } - if (env.FORCE_COLOR.length === 0) { - return 1; - } - const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); - if (![0, 1, 2, 3].includes(level)) { - return; - } - return level; -} -function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} -function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { - const noFlagForceColor = envForceColor(); - if (noFlagForceColor !== void 0) { - flagForceColor = noFlagForceColor; - } - const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; - if (forceColor === 0) { - return 0; - } - if (sniffFlags) { - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; - } - if (hasFlag("color=256")) { - return 2; - } - } - if ("TF_BUILD" in env && "AGENT_NAME" in env) { - return 1; - } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; - } - if (import_node_process.default.platform === "win32") { - const osRelease = import_node_os.default.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env) { - if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) { - return 3; - } - if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { - return 1; - } - return min; - } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if (env.COLORTERM === "truecolor") { - return 3; - } - if (env.TERM === "xterm-kitty") { - return 3; - } - if (env.TERM === "xterm-ghostty") { - return 3; - } - if (env.TERM === "wezterm") { - return 3; - } - if ("TERM_PROGRAM" in env) { - const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": { - return version2 >= 3 ? 3 : 2; - } - case "Apple_Terminal": { - return 2; - } - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ("COLORTERM" in env) { - return 1; - } - return min; -} -function createSupportsColor(stream, options = {}) { - const level = _supportsColor(stream, { - streamIsTTY: stream && stream.isTTY, - ...options - }); - return translateLevel(level); -} -var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default; -var init_supports_color = __esm({ - ".yarn/cache/supports-color-npm-10.2.2-e43ac15f9f-fb28dd7e0c.zip/node_modules/supports-color/index.js"() { - import_node_process = __toESM(require("node:process"), 1); - import_node_os = __toESM(require("node:os"), 1); - import_node_tty = __toESM(require("node:tty"), 1); - ({ env } = import_node_process.default); - if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - flagForceColor = 0; - } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - flagForceColor = 1; - } - supportsColor = { - stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }), - stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) }) - }; - supports_color_default = supportsColor; - } -}); - -// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/node.js -var require_node2 = __commonJS({ - ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/node.js"(exports2, module2) { - var tty2 = require("tty"); - var util = require("util"); - exports2.init = init; - exports2.log = log2; - exports2.formatArgs = formatArgs; - exports2.save = save; - exports2.load = load; - exports2.useColors = useColors; - exports2.destroy = util.deprecate( - () => { - }, - "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." - ); - exports2.colors = [6, 2, 3, 4, 5, 1]; - try { - const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports)); - if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) { - exports2.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } - } catch (error) { - } - exports2.inspectOpts = Object.keys(process.env).filter((key) => { - return /^debug_/i.test(key); - }).reduce((obj, key) => { - const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === "null") { - val = null; - } else { - val = Number(val); - } - obj[prop] = val; - return obj; - }, {}); - function useColors() { - return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd); - } - function formatArgs(args) { - const { namespace: name2, useColors: useColors2 } = this; - if (useColors2) { - const c = this.color; - const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix = ` ${colorCode};1m${name2} \x1B[0m`; - args[0] = prefix + args[0].split("\n").join("\n" + prefix); - args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); - } else { - args[0] = getDate() + name2 + " " + args[0]; - } - } - function getDate() { - if (exports2.inspectOpts.hideDate) { - return ""; - } - return (/* @__PURE__ */ new Date()).toISOString() + " "; - } - function log2(...args) { - return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); - } - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - delete process.env.DEBUG; - } - } - function load() { - return process.env.DEBUG; - } - function init(debug2) { - debug2.inspectOpts = {}; - const keys = Object.keys(exports2.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; - } - } - module2.exports = require_common()(exports2); - var { formatters } = module2.exports; - formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); - }; - formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); - }; - } -}); - -// .yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/index.js -var require_src = __commonJS({ - ".yarn/__virtual__/debug-virtual-436baa457e/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/index.js"(exports2, module2) { - if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { - module2.exports = require_browser(); - } else { - module2.exports = require_node2(); - } - } -}); - -// .yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-fe7dd8b1bd.zip/node_modules/proxy-from-env/index.js -var require_proxy_from_env = __commonJS({ - ".yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-fe7dd8b1bd.zip/node_modules/proxy-from-env/index.js"(exports2) { - "use strict"; - var parseUrl = require("url").parse; - var DEFAULT_PORTS = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 - }; - var stringEndsWith = String.prototype.endsWith || function(s) { - return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; - }; - function getProxyForUrl(url) { - var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== "string" || !hostname || typeof proto !== "string") { - return ""; - } - proto = proto.split(":", 1)[0]; - hostname = hostname.replace(/:\d*$/, ""); - port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ""; - } - var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy"); - if (proxy && proxy.indexOf("://") === -1) { - proxy = proto + "://" + proxy; - } - return proxy; - } - function shouldProxy(hostname, port) { - var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase(); - if (!NO_PROXY) { - return true; - } - if (NO_PROXY === "*") { - return false; - } - return NO_PROXY.split(/[,\s]/).every(function(proxy) { - if (!proxy) { - return true; - } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; - } - if (!/^[.*]/.test(parsedProxyHostname)) { - return hostname !== parsedProxyHostname; - } - if (parsedProxyHostname.charAt(0) === "*") { - parsedProxyHostname = parsedProxyHostname.slice(1); - } - return !stringEndsWith.call(hostname, parsedProxyHostname); - }); - } - function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; - } - exports2.getProxyForUrl = getProxyForUrl; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/errors.js -var require_errors = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/errors.js"(exports2, module2) { - "use strict"; - var kUndiciError = Symbol.for("undici.error.UND_ERR"); - var UndiciError = class extends Error { - constructor(message) { - super(message); - this.name = "UndiciError"; - this.code = "UND_ERR"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kUndiciError] === true; - } - [kUndiciError] = true; - }; - var kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); - var ConnectTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kConnectTimeoutError] === true; - } - [kConnectTimeoutError] = true; - }; - var kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); - var HeadersTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kHeadersTimeoutError] === true; - } - [kHeadersTimeoutError] = true; - }; - var kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); - var HeadersOverflowError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kHeadersOverflowError] === true; - } - [kHeadersOverflowError] = true; - }; - var kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); - var BodyTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kBodyTimeoutError] === true; - } - [kBodyTimeoutError] = true; - }; - var kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); - var ResponseStatusCodeError = class extends UndiciError { - constructor(message, statusCode, headers, body) { - super(message); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kResponseStatusCodeError] === true; - } - [kResponseStatusCodeError] = true; - }; - var kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); - var InvalidArgumentError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kInvalidArgumentError] === true; - } - [kInvalidArgumentError] = true; - }; - var kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); - var InvalidReturnValueError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kInvalidReturnValueError] === true; - } - [kInvalidReturnValueError] = true; - }; - var kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); - var AbortError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "AbortError"; - this.message = message || "The operation was aborted"; - this.code = "UND_ERR_ABORT"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kAbortError] === true; - } - [kAbortError] = true; - }; - var kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); - var RequestAbortedError = class extends AbortError { - constructor(message) { - super(message); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kRequestAbortedError] === true; - } - [kRequestAbortedError] = true; - }; - var kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); - var InformationalError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kInformationalError] === true; - } - [kInformationalError] = true; - }; - var kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); - var RequestContentLengthMismatchError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kRequestContentLengthMismatchError] === true; - } - [kRequestContentLengthMismatchError] = true; - }; - var kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); - var ResponseContentLengthMismatchError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kResponseContentLengthMismatchError] === true; - } - [kResponseContentLengthMismatchError] = true; - }; - var kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); - var ClientDestroyedError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kClientDestroyedError] === true; - } - [kClientDestroyedError] = true; - }; - var kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); - var ClientClosedError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kClientClosedError] === true; - } - [kClientClosedError] = true; - }; - var kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); - var SocketError = class extends UndiciError { - constructor(message, socket) { - super(message); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kSocketError] === true; - } - [kSocketError] = true; - }; - var kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); - var NotSupportedError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kNotSupportedError] === true; - } - [kNotSupportedError] = true; - }; - var kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); - var BalancedPoolMissingUpstreamError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true; - } - [kBalancedPoolMissingUpstreamError] = true; - }; - var kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); - var HTTPParserError = class extends Error { - constructor(message, code2, data) { - super(message); - this.name = "HTTPParserError"; - this.code = code2 ? `HPE_${code2}` : void 0; - this.data = data ? data.toString() : void 0; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kHTTPParserError] === true; - } - [kHTTPParserError] = true; - }; - var kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); - var ResponseExceededMaxSizeError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ResponseExceededMaxSizeError"; - this.message = message || "Response content exceeded max size"; - this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kResponseExceededMaxSizeError] === true; - } - [kResponseExceededMaxSizeError] = true; - }; - var kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); - var RequestRetryError = class extends UndiciError { - constructor(message, code2, { headers, data }) { - super(message); - this.name = "RequestRetryError"; - this.message = message || "Request retry error"; - this.code = "UND_ERR_REQ_RETRY"; - this.statusCode = code2; - this.data = data; - this.headers = headers; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kRequestRetryError] === true; - } - [kRequestRetryError] = true; - }; - var kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); - var ResponseError = class extends UndiciError { - constructor(message, code2, { headers, data }) { - super(message); - this.name = "ResponseError"; - this.message = message || "Response error"; - this.code = "UND_ERR_RESPONSE"; - this.statusCode = code2; - this.data = data; - this.headers = headers; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kResponseError] === true; - } - [kResponseError] = true; - }; - var kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); - var SecureProxyConnectionError = class extends UndiciError { - constructor(cause, message, options) { - super(message, { cause, ...options ?? {} }); - this.name = "SecureProxyConnectionError"; - this.message = message || "Secure Proxy Connection failed"; - this.code = "UND_ERR_PRX_TLS"; - this.cause = cause; - } - static [Symbol.hasInstance](instance) { - return instance && instance[kSecureProxyConnectionError] === true; - } - [kSecureProxyConnectionError] = true; - }; - module2.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/symbols.js -var require_symbols = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/symbols.js"(exports2, module2) { - module2.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kLocalAddress: Symbol("local address"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kBody: Symbol("abstracted request body"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol.for("nodejs.stream.destroyed"), - kResume: Symbol("resume"), - kOnError: Symbol("on error"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelining"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kInterceptors: Symbol("dispatch interceptors"), - kMaxResponseSize: Symbol("max response size"), - kHTTP2Session: Symbol("http2Session"), - kHTTP2SessionState: Symbol("http2Session state"), - kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), - kConstruct: Symbol("constructable"), - kListeners: Symbol("listeners"), - kHTTPContext: Symbol("http context"), - kMaxConcurrentStreams: Symbol("max concurrent streams"), - kNoProxyAgent: Symbol("no proxy agent"), - kHttpProxyAgent: Symbol("http proxy agent"), - kHttpsProxyAgent: Symbol("https proxy agent") - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/constants.js -var require_constants2 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/constants.js"(exports2, module2) { - "use strict"; - var headerNameLowerCasedRecord = {}; - var wellknownHeaderNames = [ - "Accept", - "Accept-Encoding", - "Accept-Language", - "Accept-Ranges", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Age", - "Allow", - "Alt-Svc", - "Alt-Used", - "Authorization", - "Cache-Control", - "Clear-Site-Data", - "Connection", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-Length", - "Content-Location", - "Content-Range", - "Content-Security-Policy", - "Content-Security-Policy-Report-Only", - "Content-Type", - "Cookie", - "Cross-Origin-Embedder-Policy", - "Cross-Origin-Opener-Policy", - "Cross-Origin-Resource-Policy", - "Date", - "Device-Memory", - "Downlink", - "ECT", - "ETag", - "Expect", - "Expect-CT", - "Expires", - "Forwarded", - "From", - "Host", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Range", - "If-Unmodified-Since", - "Keep-Alive", - "Last-Modified", - "Link", - "Location", - "Max-Forwards", - "Origin", - "Permissions-Policy", - "Pragma", - "Proxy-Authenticate", - "Proxy-Authorization", - "RTT", - "Range", - "Referer", - "Referrer-Policy", - "Refresh", - "Retry-After", - "Sec-WebSocket-Accept", - "Sec-WebSocket-Extensions", - "Sec-WebSocket-Key", - "Sec-WebSocket-Protocol", - "Sec-WebSocket-Version", - "Server", - "Server-Timing", - "Service-Worker-Allowed", - "Service-Worker-Navigation-Preload", - "Set-Cookie", - "SourceMap", - "Strict-Transport-Security", - "Supports-Loading-Mode", - "TE", - "Timing-Allow-Origin", - "Trailer", - "Transfer-Encoding", - "Upgrade", - "Upgrade-Insecure-Requests", - "User-Agent", - "Vary", - "Via", - "WWW-Authenticate", - "X-Content-Type-Options", - "X-DNS-Prefetch-Control", - "X-Frame-Options", - "X-Permitted-Cross-Domain-Policies", - "X-Powered-By", - "X-Requested-With", - "X-XSS-Protection" - ]; - for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i]; - const lowerCasedKey = key.toLowerCase(); - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; - } - Object.setPrototypeOf(headerNameLowerCasedRecord, null); - module2.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/tree.js -var require_tree = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/tree.js"(exports2, module2) { - "use strict"; - var { - wellknownHeaderNames, - headerNameLowerCasedRecord - } = require_constants2(); - var TstNode = class _TstNode { - /** @type {any} */ - value = null; - /** @type {null | TstNode} */ - left = null; - /** @type {null | TstNode} */ - middle = null; - /** @type {null | TstNode} */ - right = null; - /** @type {number} */ - code; - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor(key, value, index) { - if (index === void 0 || index >= key.length) { - throw new TypeError("Unreachable"); - } - const code2 = this.code = key.charCodeAt(index); - if (code2 > 127) { - throw new TypeError("key must be ascii string"); - } - if (key.length !== ++index) { - this.middle = new _TstNode(key, value, index); - } else { - this.value = value; - } - } - /** - * @param {string} key - * @param {any} value - */ - add(key, value) { - const length = key.length; - if (length === 0) { - throw new TypeError("Unreachable"); - } - let index = 0; - let node = this; - while (true) { - const code2 = key.charCodeAt(index); - if (code2 > 127) { - throw new TypeError("key must be ascii string"); - } - if (node.code === code2) { - if (length === ++index) { - node.value = value; - break; - } else if (node.middle !== null) { - node = node.middle; - } else { - node.middle = new _TstNode(key, value, index); - break; - } - } else if (node.code < code2) { - if (node.left !== null) { - node = node.left; - } else { - node.left = new _TstNode(key, value, index); - break; - } - } else if (node.right !== null) { - node = node.right; - } else { - node.right = new _TstNode(key, value, index); - break; - } - } - } - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search(key) { - const keylength = key.length; - let index = 0; - let node = this; - while (node !== null && index < keylength) { - let code2 = key[index]; - if (code2 <= 90 && code2 >= 65) { - code2 |= 32; - } - while (node !== null) { - if (code2 === node.code) { - if (keylength === ++index) { - return node; - } - node = node.middle; - break; - } - node = node.code < code2 ? node.left : node.right; - } - } - return null; - } - }; - var TernarySearchTree = class { - /** @type {TstNode | null} */ - node = null; - /** - * @param {string} key - * @param {any} value - * */ - insert(key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0); - } else { - this.node.add(key, value); - } - } - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup(key) { - return this.node?.search(key)?.value ?? null; - } - }; - var tree = new TernarySearchTree(); - for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; - tree.insert(key, key); - } - module2.exports = { - TernarySearchTree, - tree - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/util.js -var require_util = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/util.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols(); - var { IncomingMessage } = require("node:http"); - var stream = require("node:stream"); - var net = require("node:net"); - var { Blob: Blob2 } = require("node:buffer"); - var nodeUtil = require("node:util"); - var { stringify } = require("node:querystring"); - var { EventEmitter: EE3 } = require("node:events"); - var { InvalidArgumentError } = require_errors(); - var { headerNameLowerCasedRecord } = require_constants2(); - var { tree } = require_tree(); - var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); - var BodyAsyncIterable = class { - constructor(body) { - this[kBody] = body; - this[kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - assert5(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody]; - } - }; - function wrapRequestBody(body) { - if (isStream2(body)) { - if (bodyLength(body) === 0) { - body.on("data", function() { - assert5(false); - }); - } - if (typeof body.readableDidRead !== "boolean") { - body[kBodyUsed] = false; - EE3.prototype.on.call(body, "data", function() { - this[kBodyUsed] = true; - }); - } - return body; - } else if (body && typeof body.pipeTo === "function") { - return new BodyAsyncIterable(body); - } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { - return new BodyAsyncIterable(body); - } else { - return body; - } - } - function nop() { - } - function isStream2(obj) { - return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; - } - function isBlobLike(object) { - if (object === null) { - return false; - } else if (object instanceof Blob2) { - return true; - } else if (typeof object !== "object") { - return false; - } else { - const sTag = object[Symbol.toStringTag]; - return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); - } - } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".'); - } - const stringified = stringify(queryParams); - if (stringified) { - url += "?" + stringified; - } - return url; - } - function isValidPort(port) { - const value = parseInt(port, 10); - return value === Number(port) && value >= 0 && value <= 65535; - } - function isHttpOrHttpsPrefixed(value) { - return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); - } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } - return url; - } - if (!url || typeof url !== "object") { - throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); - } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && isValidPort(url.port) === false) { - throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); - } - if (url.path != null && typeof url.path !== "string") { - throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); - } - if (url.pathname != null && typeof url.pathname !== "string") { - throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); - } - if (url.hostname != null && typeof url.hostname !== "string") { - throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); - } - if (url.origin != null && typeof url.origin !== "string") { - throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); - } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin[origin.length - 1] === "/") { - origin = origin.slice(0, origin.length - 1); - } - if (path16 && path16[0] !== "/") { - path16 = `/${path16}`; - } - return new URL(`${origin}${path16}`); - } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } - return url; - } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { - throw new InvalidArgumentError("invalid url"); - } - return url; - } - function getHostname(host) { - if (host[0] === "[") { - const idx2 = host.indexOf("]"); - assert5(idx2 !== -1); - return host.substring(1, idx2); - } - const idx = host.indexOf(":"); - if (idx === -1) return host; - return host.substring(0, idx); - } - function getServerName(host) { - if (!host) { - return null; - } - assert5(typeof host === "string"); - const servername = getHostname(host); - if (net.isIP(servername)) { - return ""; - } - return servername; - } - function deepClone(obj) { - return JSON.parse(JSON.stringify(obj)); - } - function isAsyncIterable(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); - } - function isIterable(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); - } - function bodyLength(body) { - if (body == null) { - return 0; - } else if (isStream2(body)) { - const state = body._readableState; - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null; - } else if (isBuffer(body)) { - return body.byteLength; - } - return null; - } - function isDestroyed(body) { - return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); - } - function destroy(stream2, err) { - if (stream2 == null || !isStream2(stream2) || isDestroyed(stream2)) { - return; - } - if (typeof stream2.destroy === "function") { - if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { - stream2.socket = null; - } - stream2.destroy(err); - } else if (err) { - queueMicrotask(() => { - stream2.emit("error", err); - }); - } - if (stream2.destroyed !== true) { - stream2[kDestroyed] = true; - } - } - var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); - return m ? parseInt(m[1], 10) * 1e3 : null; - } - function headerNameToString(value) { - return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); - } - function bufferToLowerCasedHeaderName(value) { - return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); - } - function parseHeaders(headers, obj) { - if (obj === void 0) obj = {}; - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]); - let val = obj[key]; - if (val) { - if (typeof val === "string") { - val = [val]; - obj[key] = val; - } - val.push(headers[i + 1].toString("utf8")); - } else { - const headersValue = headers[i + 1]; - if (typeof headersValue === "string") { - obj[key] = headersValue; - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); - } - } - } - if ("content-length" in obj && "content-disposition" in obj) { - obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); - } - return obj; - } - function parseRawHeaders(headers) { - const len = headers.length; - const ret = new Array(len); - let hasContentLength = false; - let contentDispositionIdx = -1; - let key; - let val; - let kLen = 0; - for (let n = 0; n < headers.length; n += 2) { - key = headers[n]; - val = headers[n + 1]; - typeof key !== "string" && (key = key.toString()); - typeof val !== "string" && (val = val.toString("utf8")); - kLen = key.length; - if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) { - hasContentLength = true; - } else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = n + 1; - } - ret[n] = key; - ret[n + 1] = val; - } - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); - } - return ret; - } - function isBuffer(buffer) { - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); - } - function validateHandler(handler, method, upgrade) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - if (typeof handler.onConnect !== "function") { - throw new InvalidArgumentError("invalid onConnect method"); - } - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); - } - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { - throw new InvalidArgumentError("invalid onBodySent method"); - } - if (upgrade || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") { - throw new InvalidArgumentError("invalid onUpgrade method"); - } - } else { - if (typeof handler.onHeaders !== "function") { - throw new InvalidArgumentError("invalid onHeaders method"); - } - if (typeof handler.onData !== "function") { - throw new InvalidArgumentError("invalid onData method"); - } - if (typeof handler.onComplete !== "function") { - throw new InvalidArgumentError("invalid onComplete method"); - } - } - } - function isDisturbed(body) { - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); - } - function isErrored(body) { - return !!(body && stream.isErrored(body)); - } - function isReadable2(body) { - return !!(body && stream.isReadable(body)); - } - function getSocketInfo(socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - }; - } - function ReadableStreamFrom(iterable) { - let iterator; - return new ReadableStream( - { - async start() { - iterator = iterable[Symbol.asyncIterator](); - }, - async pull(controller) { - const { done, value } = await iterator.next(); - if (done) { - queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)); - } - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: "bytes" - } - ); - } - function isFormDataLike(object) { - return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; - } - function addAbortListener(signal, listener) { - if ("addEventListener" in signal) { - signal.addEventListener("abort", listener, { once: true }); - return () => signal.removeEventListener("abort", listener); - } - signal.addListener("abort", listener); - return () => signal.removeListener("abort", listener); - } - var hasToWellFormed = typeof String.prototype.toWellFormed === "function"; - var hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; - function toUSVString(val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val); - } - function isUSVString(val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; - } - function isTokenCharCode(c) { - switch (c) { - case 34: - case 40: - case 41: - case 44: - case 47: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 91: - case 92: - case 93: - case 123: - case 125: - return false; - default: - return c >= 33 && c <= 126; - } - } - function isValidHTTPToken(characters) { - if (characters.length === 0) { - return false; - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false; - } - } - return true; - } - var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - function isValidHeaderValue(characters) { - return !headerCharRegex.test(characters); - } - function parseRangeHeader(range) { - if (range == null || range === "") return { start: 0, end: null, size: null }; - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; - return m ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } : null; - } - function addListener(obj, name2, listener) { - const listeners = obj[kListeners] ??= []; - listeners.push([name2, listener]); - obj.on(name2, listener); - return obj; - } - function removeAllListeners(obj) { - for (const [name2, listener] of obj[kListeners] ?? []) { - obj.removeListener(name2, listener); - } - obj[kListeners] = null; - } - function errorRequest(client, request, err) { - try { - request.onError(err); - assert5(request.aborted); - } catch (err2) { - client.emit("error", err2); - } - } - var kEnumerableProperty = /* @__PURE__ */ Object.create(null); - kEnumerableProperty.enumerable = true; - var normalizedMethodRecordsBase = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - var normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: "patch", - PATCH: "PATCH" - }; - Object.setPrototypeOf(normalizedMethodRecordsBase, null); - Object.setPrototypeOf(normalizedMethodRecords, null); - module2.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable: isReadable2, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream: isStream2, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"], - wrapRequestBody - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/readable.js -var require_readable = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/readable.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var { Readable: Readable2 } = require("node:stream"); - var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); - var util = require_util(); - var { ReadableStreamFrom } = require_util(); - var kConsume = Symbol("kConsume"); - var kReading = Symbol("kReading"); - var kBody = Symbol("kBody"); - var kAbort = Symbol("kAbort"); - var kContentType = Symbol("kContentType"); - var kContentLength = Symbol("kContentLength"); - var noop3 = () => { - }; - var BodyReadable = class extends Readable2 { - constructor({ - resume, - abort, - contentType = "", - contentLength, - highWaterMark = 64 * 1024 - // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }); - this._readableState.dataEmitted = false; - this[kAbort] = abort; - this[kConsume] = null; - this[kBody] = null; - this[kContentType] = contentType; - this[kContentLength] = contentLength; - this[kReading] = false; - } - destroy(err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (err) { - this[kAbort](); - } - return super.destroy(err); - } - _destroy(err, callback) { - if (!this[kReading]) { - setImmediate(() => { - callback(err); - }); - } else { - callback(err); - } - } - on(ev, ...args) { - if (ev === "data" || ev === "readable") { - this[kReading] = true; - } - return super.on(ev, ...args); - } - addListener(ev, ...args) { - return this.on(ev, ...args); - } - off(ev, ...args) { - const ret = super.off(ev, ...args); - if (ev === "data" || ev === "readable") { - this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - } - return ret; - } - removeListener(ev, ...args) { - return this.off(ev, ...args); - } - push(chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk); - return this[kReading] ? super.push(chunk) : true; - } - return super.push(chunk); - } - // https://fetch.spec.whatwg.org/#dom-body-text - async text() { - return consume(this, "text"); - } - // https://fetch.spec.whatwg.org/#dom-body-json - async json() { - return consume(this, "json"); - } - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob() { - return consume(this, "blob"); - } - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes() { - return consume(this, "bytes"); - } - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer() { - return consume(this, "arrayBuffer"); - } - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData() { - throw new NotSupportedError(); - } - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed() { - return util.isDisturbed(this); - } - // https://fetch.spec.whatwg.org/#dom-body-body - get body() { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this); - if (this[kConsume]) { - this[kBody].getReader(); - assert5(this[kBody].locked); - } - } - return this[kBody]; - } - async dump(opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; - const signal = opts?.signal; - if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { - throw new InvalidArgumentError("signal must be an AbortSignal"); - } - signal?.throwIfAborted(); - if (this._readableState.closeEmitted) { - return null; - } - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()); - } - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()); - }; - signal?.addEventListener("abort", onAbort); - this.on("close", function() { - signal?.removeEventListener("abort", onAbort); - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()); - } else { - resolve(null); - } - }).on("error", noop3).on("data", function(chunk) { - limit -= chunk.length; - if (limit <= 0) { - this.destroy(); - } - }).resume(); - }); - } - }; - function isLocked(self2) { - return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; - } - function isUnusable(self2) { - return util.isDisturbed(self2) || isLocked(self2); - } - async function consume(stream, type) { - assert5(!stream[kConsume]); - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState; - if (rState.destroyed && rState.closeEmitted === false) { - stream.on("error", (err) => { - reject(err); - }).on("close", () => { - reject(new TypeError("unusable")); - }); - } else { - reject(rState.errored ?? new TypeError("unusable")); - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - }; - stream.on("error", function(err) { - consumeFinish(this[kConsume], err); - }).on("close", function() { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()); - } - }); - consumeStart(stream[kConsume]); - }); - } - }); - } - function consumeStart(consume2) { - if (consume2.body === null) { - return; - } - const { _readableState: state } = consume2.stream; - if (state.bufferIndex) { - const start = state.bufferIndex; - const end = state.buffer.length; - for (let n = start; n < end; n++) { - consumePush(consume2, state.buffer[n]); - } - } else { - for (const chunk of state.buffer) { - consumePush(consume2, chunk); - } - } - if (state.endEmitted) { - consumeEnd(this[kConsume]); - } else { - consume2.stream.on("end", function() { - consumeEnd(this[kConsume]); - }); - } - consume2.stream.resume(); - while (consume2.stream.read() != null) { - } - } - function chunksDecode(chunks, length) { - if (chunks.length === 0 || length === 0) { - return ""; - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); - const bufferLength = buffer.length; - const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; - return buffer.utf8Slice(start, bufferLength); - } - function chunksConcat(chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0); - } - if (chunks.length === 1) { - return new Uint8Array(chunks[0]); - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); - let offset = 0; - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i]; - buffer.set(chunk, offset); - offset += chunk.length; - } - return buffer; - } - function consumeEnd(consume2) { - const { type, body, resolve, stream, length } = consume2; - try { - if (type === "text") { - resolve(chunksDecode(body, length)); - } else if (type === "json") { - resolve(JSON.parse(chunksDecode(body, length))); - } else if (type === "arrayBuffer") { - resolve(chunksConcat(body, length).buffer); - } else if (type === "blob") { - resolve(new Blob(body, { type: stream[kContentType] })); - } else if (type === "bytes") { - resolve(chunksConcat(body, length)); - } - consumeFinish(consume2); - } catch (err) { - stream.destroy(err); - } - } - function consumePush(consume2, chunk) { - consume2.length += chunk.length; - consume2.body.push(chunk); - } - function consumeFinish(consume2, err) { - if (consume2.body === null) { - return; - } - if (err) { - consume2.reject(err); - } else { - consume2.resolve(); - } - consume2.type = null; - consume2.stream = null; - consume2.resolve = null; - consume2.reject = null; - consume2.length = 0; - consume2.body = null; - } - module2.exports = { Readable: BodyReadable, chunksDecode }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/util.js -var require_util2 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/util.js"(exports2, module2) { - var assert5 = require("node:assert"); - var { - ResponseStatusCodeError - } = require_errors(); - var { chunksDecode } = require_readable(); - var CHUNK_LIMIT = 128 * 1024; - async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert5(body); - let chunks = []; - let length = 0; - try { - for await (const chunk of body) { - chunks.push(chunk); - length += chunk.length; - if (length > CHUNK_LIMIT) { - chunks = []; - length = 0; - break; - } - } - } catch { - chunks = []; - length = 0; - } - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); - return; - } - const stackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - let payload; - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)); - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length); - } - } catch { - } finally { - Error.stackTraceLimit = stackTraceLimit; - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); - } - var isContentTypeApplicationJson = (contentType) => { - return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; - }; - var isContentTypeText = (contentType) => { - return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; - }; - module2.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-request.js -var require_api_request = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-request.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var { Readable: Readable2 } = require_readable(); - var { InvalidArgumentError, RequestAbortedError } = require_errors(); - var util = require_util(); - var { getResolveErrorBodyCallback } = require_util2(); - var { AsyncResource } = require("node:async_hooks"); - var RequestHandler = class extends AsyncResource { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; - try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { - throw new InvalidArgumentError("invalid highWaterMark"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_REQUEST"); - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", util.nop), err); - } - throw err; - } - this.method = method; - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError; - this.highWaterMark = highWaterMark; - this.signal = signal; - this.reason = null; - this.removeAbortListener = null; - if (util.isStream(body)) { - body.on("error", (err) => { - this.onError(err); - }); - } - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError(); - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError(); - if (this.res) { - util.destroy(this.res.on("error", util.nop), this.reason); - } else if (this.abort) { - this.abort(this.reason); - } - if (this.removeAbortListener) { - this.res?.off("close", this.removeAbortListener); - this.removeAbortListener(); - this.removeAbortListener = null; - } - }); - } - } - } - onConnect(abort, context) { - if (this.reason) { - abort(this.reason); - return; - } - assert5(this.callback); - this.abort = abort; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }); - } - return; - } - const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - const contentLength = parsedHeaders["content-length"]; - const res = new Readable2({ - resume, - abort, - contentType, - contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, - highWaterMark - }); - if (this.removeAbortListener) { - res.on("close", this.removeAbortListener); - } - this.callback = null; - this.res = res; - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope( - getResolveErrorBodyCallback, - null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ); - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }); - } - } - } - onData(chunk) { - return this.res.push(chunk); - } - onComplete(trailers) { - util.parseHeaders(trailers, this.trailers); - this.res.push(null); - } - onError(err) { - const { res, callback, body, opaque } = this; - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (res) { - this.res = null; - queueMicrotask(() => { - util.destroy(res, err); - }); - } - if (body) { - this.body = null; - util.destroy(body, err); - } - if (this.removeAbortListener) { - res?.off("close", this.removeAbortListener); - this.removeAbortListener(); - this.removeAbortListener = null; - } - } - }; - function request(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - this.dispatch(opts, new RequestHandler(opts, callback)); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module2.exports = request; - module2.exports.RequestHandler = RequestHandler; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/abort-signal.js -var require_abort_signal = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { - var { addAbortListener } = require_util(); - var { RequestAbortedError } = require_errors(); - var kListener = Symbol("kListener"); - var kSignal = Symbol("kSignal"); - function abort(self2) { - if (self2.abort) { - self2.abort(self2[kSignal]?.reason); - } else { - self2.reason = self2[kSignal]?.reason ?? new RequestAbortedError(); - } - removeSignal(self2); - } - function addSignal(self2, signal) { - self2.reason = null; - self2[kSignal] = null; - self2[kListener] = null; - if (!signal) { - return; - } - if (signal.aborted) { - abort(self2); - return; - } - self2[kSignal] = signal; - self2[kListener] = () => { - abort(self2); - }; - addAbortListener(self2[kSignal], self2[kListener]); - } - function removeSignal(self2) { - if (!self2[kSignal]) { - return; - } - if ("removeEventListener" in self2[kSignal]) { - self2[kSignal].removeEventListener("abort", self2[kListener]); - } else { - self2[kSignal].removeListener("abort", self2[kListener]); - } - self2[kSignal] = null; - self2[kListener] = null; - } - module2.exports = { - addSignal, - removeSignal - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-stream.js -var require_api_stream = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-stream.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var { finished, PassThrough } = require("node:stream"); - var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); - var util = require_util(); - var { getResolveErrorBodyCallback } = require_util2(); - var { AsyncResource } = require("node:async_hooks"); - var { addSignal, removeSignal } = require_abort_signal(); - var StreamHandler = class extends AsyncResource { - constructor(opts, factory, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; - try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("invalid factory"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_STREAM"); - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", util.nop), err); - } - throw err; - } - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.factory = factory; - this.callback = callback; - this.res = null; - this.abort = null; - this.context = null; - this.trailers = null; - this.body = body; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError || false; - if (util.isStream(body)) { - body.on("error", (err) => { - this.onError(err); - }); - } - addSignal(this, signal); - } - onConnect(abort, context) { - if (this.reason) { - abort(this.reason); - return; - } - assert5(this.callback); - this.abort = abort; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this; - const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }); - } - return; - } - this.factory = null; - let res; - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - res = new PassThrough(); - this.callback = null; - this.runInAsyncScope( - getResolveErrorBodyCallback, - null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ); - } else { - if (factory === null) { - return; - } - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { - throw new InvalidReturnValueError("expected Writable"); - } - finished(res, { readable: false }, (err) => { - const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; - this.res = null; - if (err || !res2.readable) { - util.destroy(res2, err); - } - this.callback = null; - this.runInAsyncScope(callback2, null, err || null, { opaque: opaque2, trailers }); - if (err) { - abort(); - } - }); - } - res.on("drain", resume); - this.res = res; - const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain; - return needDrain !== true; - } - onData(chunk) { - const { res } = this; - return res ? res.write(chunk) : true; - } - onComplete(trailers) { - const { res } = this; - removeSignal(this); - if (!res) { - return; - } - this.trailers = util.parseHeaders(trailers); - res.end(); - } - onError(err) { - const { res, callback, opaque, body } = this; - removeSignal(this); - this.factory = null; - if (res) { - this.res = null; - util.destroy(res, err); - } else if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (body) { - this.body = null; - util.destroy(body, err); - } - } - }; - function stream(opts, factory, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module2.exports = stream; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-pipeline.js -var require_api_pipeline = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { - "use strict"; - var { - Readable: Readable2, - Duplex, - PassThrough - } = require("node:stream"); - var { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError - } = require_errors(); - var util = require_util(); - var { AsyncResource } = require("node:async_hooks"); - var { addSignal, removeSignal } = require_abort_signal(); - var assert5 = require("node:assert"); - var kResume = Symbol("resume"); - var PipelineRequest = class extends Readable2 { - constructor() { - super({ autoDestroy: true }); - this[kResume] = null; - } - _read() { - const { [kResume]: resume } = this; - if (resume) { - this[kResume] = null; - resume(); - } - } - _destroy(err, callback) { - this._read(); - callback(err); - } - }; - var PipelineResponse = class extends Readable2 { - constructor(resume) { - super({ autoDestroy: true }); - this[kResume] = resume; - } - _read() { - this[kResume](); - } - _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } - callback(err); - } - }; - var PipelineHandler = class extends AsyncResource { - constructor(opts, handler) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof handler !== "function") { - throw new InvalidArgumentError("invalid handler"); - } - const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_PIPELINE"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.handler = handler; - this.abort = null; - this.context = null; - this.onInfo = onInfo || null; - this.req = new PipelineRequest().on("error", util.nop); - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this; - if (body?.resume) { - body.resume(); - } - }, - write: (chunk, encoding, callback) => { - const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback(); - } else { - req[kResume] = callback; - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this; - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (abort && err) { - abort(); - } - util.destroy(body, err); - util.destroy(req, err); - util.destroy(res, err); - removeSignal(this); - callback(err); - } - }).on("prefinish", () => { - const { req } = this; - req.push(null); - }); - this.res = null; - addSignal(this, signal); - } - onConnect(abort, context) { - const { ret, res } = this; - if (this.reason) { - abort(this.reason); - return; - } - assert5(!res, "pipeline cannot be retried"); - assert5(!ret.destroyed); - this.abort = abort; - this.context = context; - } - onHeaders(statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this; - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - this.onInfo({ statusCode, headers }); - } - return; - } - this.res = new PipelineResponse(resume); - let body; - try { - this.handler = null; - const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }); - } catch (err) { - this.res.on("error", util.nop); - throw err; - } - if (!body || typeof body.on !== "function") { - throw new InvalidReturnValueError("expected Readable"); - } - body.on("data", (chunk) => { - const { ret, body: body2 } = this; - if (!ret.push(chunk) && body2.pause) { - body2.pause(); - } - }).on("error", (err) => { - const { ret } = this; - util.destroy(ret, err); - }).on("end", () => { - const { ret } = this; - ret.push(null); - }).on("close", () => { - const { ret } = this; - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()); - } - }); - this.body = body; - } - onData(chunk) { - const { res } = this; - return res.push(chunk); - } - onComplete(trailers) { - const { res } = this; - res.push(null); - } - onError(err) { - const { ret } = this; - this.handler = null; - util.destroy(ret, err); - } - }; - function pipeline(opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler); - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); - return pipelineHandler.ret; - } catch (err) { - return new PassThrough().destroy(err); - } - } - module2.exports = pipeline; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-upgrade.js -var require_api_upgrade = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-upgrade.js"(exports2, module2) { - "use strict"; - var { InvalidArgumentError, SocketError } = require_errors(); - var { AsyncResource } = require("node:async_hooks"); - var util = require_util(); - var { addSignal, removeSignal } = require_abort_signal(); - var assert5 = require("node:assert"); - var UpgradeHandler = class extends AsyncResource { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - super("UNDICI_UPGRADE"); - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; - this.callback = callback; - this.abort = null; - this.context = null; - addSignal(this, signal); - } - onConnect(abort, context) { - if (this.reason) { - abort(this.reason); - return; - } - assert5(this.callback); - this.abort = abort; - this.context = null; - } - onHeaders() { - throw new SocketError("bad upgrade", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - assert5(statusCode === 101); - const { callback, opaque, context } = this; - removeSignal(this); - this.callback = null; - const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function upgrade(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - const upgradeHandler = new UpgradeHandler(opts, callback); - this.dispatch({ - ...opts, - method: opts.method || "GET", - upgrade: opts.protocol || "Websocket" - }, upgradeHandler); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module2.exports = upgrade; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-connect.js -var require_api_connect = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/api-connect.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var { AsyncResource } = require("node:async_hooks"); - var { InvalidArgumentError, SocketError } = require_errors(); - var util = require_util(); - var { addSignal, removeSignal } = require_abort_signal(); - var ConnectHandler = class extends AsyncResource { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - super("UNDICI_CONNECT"); - this.opaque = opaque || null; - this.responseHeaders = responseHeaders || null; - this.callback = callback; - this.abort = null; - addSignal(this, signal); - } - onConnect(abort, context) { - if (this.reason) { - abort(this.reason); - return; - } - assert5(this.callback); - this.abort = abort; - this.context = context; - } - onHeaders() { - throw new SocketError("bad connect", null); - } - onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this; - removeSignal(this); - this.callback = null; - let headers = rawHeaders; - if (headers != null) { - headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - } - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }); - } - onError(err) { - const { callback, opaque } = this; - removeSignal(this); - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - } - }; - function connect(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - const connectHandler = new ConnectHandler(opts, callback); - this.dispatch({ ...opts, method: "CONNECT" }, connectHandler); - } catch (err) { - if (typeof callback !== "function") { - throw err; - } - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); - } - } - module2.exports = connect; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/index.js -var require_api = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/api/index.js"(exports2, module2) { - "use strict"; - module2.exports.request = require_api_request(); - module2.exports.stream = require_api_stream(); - module2.exports.pipeline = require_api_pipeline(); - module2.exports.upgrade = require_api_upgrade(); - module2.exports.connect = require_api_connect(); - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher.js -var require_dispatcher = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) { - "use strict"; - var EventEmitter2 = require("node:events"); - var Dispatcher = class extends EventEmitter2 { - dispatch() { - throw new Error("not implemented"); - } - close() { - throw new Error("not implemented"); - } - destroy() { - throw new Error("not implemented"); - } - compose(...args) { - const interceptors = Array.isArray(args[0]) ? args[0] : args; - let dispatch = this.dispatch.bind(this); - for (const interceptor of interceptors) { - if (interceptor == null) { - continue; - } - if (typeof interceptor !== "function") { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); - } - dispatch = interceptor(dispatch); - if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { - throw new TypeError("invalid interceptor"); - } - } - return new ComposedDispatcher(this, dispatch); - } - }; - var ComposedDispatcher = class extends Dispatcher { - #dispatcher = null; - #dispatch = null; - constructor(dispatcher, dispatch) { - super(); - this.#dispatcher = dispatcher; - this.#dispatch = dispatch; - } - dispatch(...args) { - this.#dispatch(...args); - } - close(...args) { - return this.#dispatcher.close(...args); - } - destroy(...args) { - return this.#dispatcher.destroy(...args); - } - }; - module2.exports = Dispatcher; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher-base.js -var require_dispatcher_base = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) { - "use strict"; - var Dispatcher = require_dispatcher(); - var { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError - } = require_errors(); - var { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols(); - var kOnDestroyed = Symbol("onDestroyed"); - var kOnClosed = Symbol("onClosed"); - var kInterceptedDispatch = Symbol("Intercepted Dispatch"); - var DispatcherBase = class extends Dispatcher { - constructor() { - super(); - this[kDestroyed] = false; - this[kOnDestroyed] = null; - this[kClosed] = false; - this[kOnClosed] = []; - } - get destroyed() { - return this[kDestroyed]; - } - get closed() { - return this[kClosed]; - } - get interceptors() { - return this[kInterceptors]; - } - set interceptors(newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i]; - if (typeof interceptor !== "function") { - throw new InvalidArgumentError("interceptor must be an function"); - } - } - } - this[kInterceptors] = newInterceptors; - } - close(callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)); - return; - } - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } - return; - } - this[kClosed] = true; - this[kOnClosed].push(callback); - const onClosed = () => { - const callbacks = this[kOnClosed]; - this[kOnClosed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } - }; - this[kClose]().then(() => this.destroy()).then(() => { - queueMicrotask(onClosed); - }); - } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === void 0) { - return new Promise((resolve, reject) => { - this.destroy(err, (err2, data) => { - return err2 ? ( - /* istanbul ignore next: should never error */ - reject(err2) - ) : resolve(data); - }); - }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } - return; - } - if (!err) { - err = new ClientDestroyedError(); - } - this[kDestroyed] = true; - this[kOnDestroyed] = this[kOnDestroyed] || []; - this[kOnDestroyed].push(callback); - const onDestroyed = () => { - const callbacks = this[kOnDestroyed]; - this[kOnDestroyed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } - }; - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed); - }); - } - [kInterceptedDispatch](opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch]; - return this[kDispatch](opts, handler); - } - let dispatch = this[kDispatch].bind(this); - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch); - } - this[kInterceptedDispatch] = dispatch; - return dispatch(opts, handler); - } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - try { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("opts must be an object."); - } - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError(); - } - if (this[kClosed]) { - throw new ClientClosedError(); - } - return this[kInterceptedDispatch](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); - } - handler.onError(err); - return false; - } - } - }; - module2.exports = DispatcherBase; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/fixed-queue.js -var require_fixed_queue = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports2, module2) { - "use strict"; - var kSize = 2048; - var kMask = kSize - 1; - var FixedCircularBuffer = class { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - isEmpty() { - return this.top === this.bottom; - } - isFull() { - return (this.top + 1 & kMask) === this.bottom; - } - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & kMask; - } - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === void 0) - return null; - this.list[this.bottom] = void 0; - this.bottom = this.bottom + 1 & kMask; - return nextItem; - } - }; - module2.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - isEmpty() { - return this.head.isEmpty(); - } - push(data) { - if (this.head.isFull()) { - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - this.tail = tail.next; - } - return next; - } - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-stats.js -var require_pool_stats = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-stats.js"(exports2, module2) { - var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols(); - var kPool = Symbol("pool"); - var PoolStats = class { - constructor(pool) { - this[kPool] = pool; - } - get connected() { - return this[kPool][kConnected]; - } - get free() { - return this[kPool][kFree]; - } - get pending() { - return this[kPool][kPending]; - } - get queued() { - return this[kPool][kQueued]; - } - get running() { - return this[kPool][kRunning]; - } - get size() { - return this[kPool][kSize]; - } - }; - module2.exports = PoolStats; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-base.js -var require_pool_base = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool-base.js"(exports2, module2) { - "use strict"; - var DispatcherBase = require_dispatcher_base(); - var FixedQueue = require_fixed_queue(); - var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols(); - var PoolStats = require_pool_stats(); - var kClients = Symbol("clients"); - var kNeedDrain = Symbol("needDrain"); - var kQueue = Symbol("queue"); - var kClosedResolve = Symbol("closed resolve"); - var kOnDrain = Symbol("onDrain"); - var kOnConnect = Symbol("onConnect"); - var kOnDisconnect = Symbol("onDisconnect"); - var kOnConnectionError = Symbol("onConnectionError"); - var kGetDispatcher = Symbol("get dispatcher"); - var kAddClient = Symbol("add client"); - var kRemoveClient = Symbol("remove client"); - var kStats = Symbol("stats"); - var PoolBase = class extends DispatcherBase { - constructor() { - super(); - this[kQueue] = new FixedQueue(); - this[kClients] = []; - this[kQueued] = 0; - const pool = this; - this[kOnDrain] = function onDrain(origin, targets) { - const queue = pool[kQueue]; - let needDrain = false; - while (!needDrain) { - const item = queue.shift(); - if (!item) { - break; - } - pool[kQueued]--; - needDrain = !this.dispatch(item.opts, item.handler); - } - this[kNeedDrain] = needDrain; - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false; - pool.emit("drain", origin, [pool, ...targets]); - } - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); - } - }; - this[kOnConnect] = (origin, targets) => { - pool.emit("connect", origin, [pool, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit("disconnect", origin, [pool, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit("connectionError", origin, [pool, ...targets], err); - }; - this[kStats] = new PoolStats(this); - } - get [kBusy]() { - return this[kNeedDrain]; - } - get [kConnected]() { - return this[kClients].filter((client) => client[kConnected]).length; - } - get [kFree]() { - return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; - } - get [kPending]() { - let ret = this[kQueued]; - for (const { [kPending]: pending } of this[kClients]) { - ret += pending; - } - return ret; - } - get [kRunning]() { - let ret = 0; - for (const { [kRunning]: running } of this[kClients]) { - ret += running; - } - return ret; - } - get [kSize]() { - let ret = this[kQueued]; - for (const { [kSize]: size } of this[kClients]) { - ret += size; - } - return ret; - } - get stats() { - return this[kStats]; - } - async [kClose]() { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map((c) => c.close())); - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve; - }); - } - } - async [kDestroy](err) { - while (true) { - const item = this[kQueue].shift(); - if (!item) { - break; - } - item.handler.onError(err); - } - await Promise.all(this[kClients].map((c) => c.destroy(err))); - } - [kDispatch](opts, handler) { - const dispatcher = this[kGetDispatcher](); - if (!dispatcher) { - this[kNeedDrain] = true; - this[kQueue].push({ opts, handler }); - this[kQueued]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true; - this[kNeedDrain] = !this[kGetDispatcher](); - } - return !this[kNeedDrain]; - } - [kAddClient](client) { - client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients].push(client); - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]); - } - }); - } - return this; - } - [kRemoveClient](client) { - client.close(() => { - const idx = this[kClients].indexOf(client); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } - }); - this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); - } - }; - module2.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/diagnostics.js -var require_diagnostics = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/diagnostics.js"(exports2, module2) { - "use strict"; - var diagnosticsChannel = require("node:diagnostics_channel"); - var util = require("node:util"); - var undiciDebugLog = util.debuglog("undici"); - var fetchDebuglog = util.debuglog("fetch"); - var websocketDebuglog = util.debuglog("websocket"); - var isClientSet = false; - var channels = { - // Client - beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), - connected: diagnosticsChannel.channel("undici:client:connected"), - connectError: diagnosticsChannel.channel("undici:client:connectError"), - sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), - // Request - create: diagnosticsChannel.channel("undici:request:create"), - bodySent: diagnosticsChannel.channel("undici:request:bodySent"), - headers: diagnosticsChannel.channel("undici:request:headers"), - trailers: diagnosticsChannel.channel("undici:request:trailers"), - error: diagnosticsChannel.channel("undici:request:error"), - // WebSocket - open: diagnosticsChannel.channel("undici:websocket:open"), - close: diagnosticsChannel.channel("undici:websocket:close"), - socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), - ping: diagnosticsChannel.channel("undici:websocket:ping"), - pong: diagnosticsChannel.channel("undici:websocket:pong") - }; - if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; - diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connecting to %s using %s%s", - `${host}${port ? `:${port}` : ""}`, - protocol, - version2 - ); - }); - diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connected to %s using %s%s", - `${host}${port ? `:${port}` : ""}`, - protocol, - version2 - ); - }); - diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host }, - error - } = evt; - debuglog( - "connection to %s using %s%s errored - %s", - `${host}${port ? `:${port}` : ""}`, - protocol, - version2, - error.message - ); - }); - diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { - const { - request: { method, path: path16, origin } - } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); - }); - diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { - const { - request: { method, path: path16, origin }, - response: { statusCode } - } = evt; - debuglog( - "received response to %s %s/%s - HTTP %d", - method, - origin, - path16, - statusCode - ); - }); - diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { - const { - request: { method, path: path16, origin } - } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); - }); - diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { - const { - request: { method, path: path16, origin }, - error - } = evt; - debuglog( - "request to %s %s/%s errored - %s", - method, - origin, - path16, - error.message - ); - }); - isClientSet = true; - } - if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; - diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connecting to %s%s using %s%s", - host, - port ? `:${port}` : "", - protocol, - version2 - ); - }); - diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connected to %s%s using %s%s", - host, - port ? `:${port}` : "", - protocol, - version2 - ); - }); - diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host }, - error - } = evt; - debuglog( - "connection to %s%s using %s%s errored - %s", - host, - port ? `:${port}` : "", - protocol, - version2, - error.message - ); - }); - diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { - const { - request: { method, path: path16, origin } - } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); - }); - } - diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { - const { - address: { address, port } - } = evt; - websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); - }); - diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { - const { websocket, code: code2, reason } = evt; - websocketDebuglog( - "closed connection to %s - %s %s", - websocket.url, - code2, - reason - ); - }); - diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { - websocketDebuglog("connection errored - %s", err.message); - }); - diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { - websocketDebuglog("ping received"); - }); - diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { - websocketDebuglog("pong received"); - }); - } - module2.exports = { - channels - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/request.js -var require_request = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/request.js"(exports2, module2) { - "use strict"; - var { - InvalidArgumentError, - NotSupportedError - } = require_errors(); - var assert5 = require("node:assert"); - var { - isValidHTTPToken, - isValidHeaderValue, - isStream: isStream2, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords - } = require_util(); - var { channels } = require_diagnostics(); - var { headerNameLowerCasedRecord } = require_constants2(); - var invalidPathRegex = /[^\u0021-\u00ff]/; - var kHandler = Symbol("handler"); - var Request = class { - constructor(origin, { - path: path16, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path16 !== "string") { - throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { - throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path16)) { - throw new InvalidArgumentError("invalid request path"); - } - if (typeof method !== "string") { - throw new InvalidArgumentError("method must be a string"); - } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) { - throw new InvalidArgumentError("invalid request method"); - } - if (upgrade && typeof upgrade !== "string") { - throw new InvalidArgumentError("upgrade must be a string"); - } - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("invalid headersTimeout"); - } - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("invalid bodyTimeout"); - } - if (reset != null && typeof reset !== "boolean") { - throw new InvalidArgumentError("invalid reset"); - } - if (expectContinue != null && typeof expectContinue !== "boolean") { - throw new InvalidArgumentError("invalid expectContinue"); - } - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.throwOnError = throwOnError === true; - this.method = method; - this.abort = null; - if (body == null) { - this.body = null; - } else if (isStream2(body)) { - this.body = body; - const rState = this.body._readableState; - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { - destroy(this); - }; - this.body.on("end", this.endHandler); - } - this.errorHandler = (err) => { - if (this.abort) { - this.abort(err); - } else { - this.error = err; - } - }; - this.body.on("error", this.errorHandler); - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null; - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null; - } else if (typeof body === "string") { - this.body = body.length ? Buffer.from(body) : null; - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body; - } else { - throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - } - this.completed = false; - this.aborted = false; - this.upgrade = upgrade || null; - this.path = query ? buildURL(path16, query) : path16; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking == null ? false : blocking; - this.reset = reset == null ? null : reset; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = []; - this.expectContinue = expectContinue != null ? expectContinue : false; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError("headers array must be even"); - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]); - } - } else if (headers && typeof headers === "object") { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError("headers must be in key-value pair format"); - } - processHeader(this, header[0], header[1]); - } - } else { - const keys = Object.keys(headers); - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]); - } - } - } else if (headers != null) { - throw new InvalidArgumentError("headers must be an object or an array"); - } - validateHandler(handler, method, upgrade); - this.servername = servername || getServerName(this.host); - this[kHandler] = handler; - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }); - } - } - onBodySent(chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk); - } catch (err) { - this.abort(err); - } - } - } - onRequestSent() { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }); - } - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent(); - } catch (err) { - this.abort(err); - } - } - } - onConnect(abort) { - assert5(!this.aborted); - assert5(!this.completed); - if (this.error) { - abort(this.error); - } else { - this.abort = abort; - return this[kHandler].onConnect(abort); - } - } - onResponseStarted() { - return this[kHandler].onResponseStarted?.(); - } - onHeaders(statusCode, headers, resume, statusText) { - assert5(!this.aborted); - assert5(!this.completed); - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); - } - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText); - } catch (err) { - this.abort(err); - } - } - onData(chunk) { - assert5(!this.aborted); - assert5(!this.completed); - try { - return this[kHandler].onData(chunk); - } catch (err) { - this.abort(err); - return false; - } - } - onUpgrade(statusCode, headers, socket) { - assert5(!this.aborted); - assert5(!this.completed); - return this[kHandler].onUpgrade(statusCode, headers, socket); - } - onComplete(trailers) { - this.onFinally(); - assert5(!this.aborted); - this.completed = true; - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }); - } - try { - return this[kHandler].onComplete(trailers); - } catch (err) { - this.onError(err); - } - } - onError(error) { - this.onFinally(); - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }); - } - if (this.aborted) { - return; - } - this.aborted = true; - return this[kHandler].onError(error); - } - onFinally() { - if (this.errorHandler) { - this.body.off("error", this.errorHandler); - this.errorHandler = null; - } - if (this.endHandler) { - this.body.off("end", this.endHandler); - this.endHandler = null; - } - } - addHeader(key, value) { - processHeader(this, key, value); - return this; - } - }; - function processHeader(request, key, val) { - if (val && (typeof val === "object" && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val === void 0) { - return; - } - let headerName = headerNameLowerCasedRecord[key]; - if (headerName === void 0) { - headerName = key.toLowerCase(); - if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError("invalid header key"); - } - } - if (Array.isArray(val)) { - const arr = []; - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === "string") { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`); - } - arr.push(val[i]); - } else if (val[i] === null) { - arr.push(""); - } else if (typeof val[i] === "object") { - throw new InvalidArgumentError(`invalid ${key} header`); - } else { - arr.push(`${val[i]}`); - } - } - val = arr; - } else if (typeof val === "string") { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`); - } - } else if (val === null) { - val = ""; - } else { - val = `${val}`; - } - if (request.host === null && headerName === "host") { - if (typeof val !== "string") { - throw new InvalidArgumentError("invalid host header"); - } - request.host = val; - } else if (request.contentLength === null && headerName === "content-length") { - request.contentLength = parseInt(val, 10); - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError("invalid content-length header"); - } - } else if (request.contentType === null && headerName === "content-type") { - request.contentType = val; - request.headers.push(key, val); - } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { - throw new InvalidArgumentError(`invalid ${headerName} header`); - } else if (headerName === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") { - throw new InvalidArgumentError("invalid connection header"); - } - if (value === "close") { - request.reset = true; - } - } else if (headerName === "expect") { - throw new NotSupportedError("expect header not supported"); - } else { - request.headers.push(key, val); - } - } - module2.exports = Request; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/util/timers.js -var require_timers = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/util/timers.js"(exports2, module2) { - "use strict"; - var fastNow = 0; - var RESOLUTION_MS = 1e3; - var TICK_MS = (RESOLUTION_MS >> 1) - 1; - var fastNowTimeout; - var kFastTimer = Symbol("kFastTimer"); - var fastTimers = []; - var NOT_IN_LIST = -2; - var TO_BE_CLEARED = -1; - var PENDING2 = 0; - var ACTIVE = 1; - function onTick() { - fastNow += TICK_MS; - let idx = 0; - let len = fastTimers.length; - while (idx < len) { - const timer = fastTimers[idx]; - if (timer._state === PENDING2) { - timer._idleStart = fastNow - TICK_MS; - timer._state = ACTIVE; - } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { - timer._state = TO_BE_CLEARED; - timer._idleStart = -1; - timer._onTimeout(timer._timerArg); - } - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST; - if (--len !== 0) { - fastTimers[idx] = fastTimers[len]; - } - } else { - ++idx; - } - } - fastTimers.length = len; - if (fastTimers.length !== 0) { - refreshTimeout(); - } - } - function refreshTimeout() { - if (fastNowTimeout) { - fastNowTimeout.refresh(); - } else { - clearTimeout(fastNowTimeout); - fastNowTimeout = setTimeout(onTick, TICK_MS); - if (fastNowTimeout.unref) { - fastNowTimeout.unref(); - } - } - } - var FastTimer = class { - [kFastTimer] = true; - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST; - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1; - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1; - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout; - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg; - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor(callback, delay, arg) { - this._onTimeout = callback; - this._idleTimeout = delay; - this._timerArg = arg; - this.refresh(); - } - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh() { - if (this._state === NOT_IN_LIST) { - fastTimers.push(this); - } - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout(); - } - this._state = PENDING2; - } - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear() { - this._state = TO_BE_CLEARED; - this._idleStart = -1; - } - }; - module2.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout(callback, delay, arg) { - return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout(timeout) { - if (timeout[kFastTimer]) { - timeout.clear(); - } else { - clearTimeout(timeout); - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout(callback, delay, arg) { - return new FastTimer(callback, delay, arg); - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout(timeout) { - timeout.clear(); - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now() { - return fastNow; - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick(delay = 0) { - fastNow += delay - RESOLUTION_MS + 1; - onTick(); - onTick(); - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset() { - fastNow = 0; - fastTimers.length = 0; - clearTimeout(fastNowTimeout); - fastNowTimeout = null; - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/connect.js -var require_connect = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/core/connect.js"(exports2, module2) { - "use strict"; - var net = require("node:net"); - var assert5 = require("node:assert"); - var util = require_util(); - var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); - var timers = require_timers(); - function noop3() { - } - var tls; - var SessionCache; - if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = /* @__PURE__ */ new Map(); - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return; - } - const ref = this._sessionCache.get(key); - if (ref !== void 0 && ref.deref() === void 0) { - this._sessionCache.delete(key); - } - }); - } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) { - return; - } - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); - } - }; - } else { - SessionCache = class SimpleSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = /* @__PURE__ */ new Map(); - } - get(sessionKey) { - return this._sessionCache.get(sessionKey); - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) { - return; - } - if (this._sessionCache.size >= this._maxCachedSessions) { - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); - } - this._sessionCache.set(sessionKey, session); - } - }; - } - function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); - } - const options = { path: socketPath, ...opts }; - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); - timeout = timeout == null ? 1e4 : timeout; - allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!tls) { - tls = require("node:tls"); - } - servername = servername || options.servername || util.getServerName(host) || null; - const sessionKey = servername || hostname; - assert5(sessionKey); - const session = customSession || sessionCache.get(sessionKey) || null; - port = port || 443; - socket = tls.connect({ - highWaterMark: 16384, - // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], - socket: httpSocket, - // upgrade socket connection - port, - host: hostname - }); - socket.on("session", function(session2) { - sessionCache.set(sessionKey, session2); - }); - } else { - assert5(!httpSocket, "httpSocket can only be sent on TLS update"); - port = port || 80; - socket = net.connect({ - highWaterMark: 64 * 1024, - // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }); - } - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); - } - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - queueMicrotask(clearConnectTimeout); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - queueMicrotask(clearConnectTimeout); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; - } - var setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop3; - } - let s1 = null; - let s2 = null; - const fastTimer = timers.setFastTimeout(() => { - s1 = setImmediate(() => { - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); - }); - }, opts.timeout); - return () => { - timers.clearFastTimeout(fastTimer); - clearImmediate(s1); - clearImmediate(s2); - }; - } : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop3; - } - let s1 = null; - const fastTimer = timers.setFastTimeout(() => { - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts); - }); - }, opts.timeout); - return () => { - timers.clearFastTimeout(fastTimer); - clearImmediate(s1); - }; - }; - function onConnectTimeout(socket, opts) { - if (socket == null) { - return; - } - let message = "Connect Timeout Error"; - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},`; - } - message += ` timeout: ${opts.timeout}ms)`; - util.destroy(socket, new ConnectTimeoutError(message)); - } - module2.exports = buildConnector; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/utils.js -var require_utils = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/utils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.enumToMap = void 0; - function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === "number") { - res[key] = value; - } - }); - return res; - } - exports2.enumToMap = enumToMap; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/constants.js -var require_constants3 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils(); - var ERROR2; - (function(ERROR3) { - ERROR3[ERROR3["OK"] = 0] = "OK"; - ERROR3[ERROR3["INTERNAL"] = 1] = "INTERNAL"; - ERROR3[ERROR3["STRICT"] = 2] = "STRICT"; - ERROR3[ERROR3["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR3[ERROR3["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR3[ERROR3["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR3[ERROR3["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR3[ERROR3["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR3[ERROR3["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR3[ERROR3["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR3[ERROR3["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR3[ERROR3["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR3[ERROR3["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR3[ERROR3["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR3[ERROR3["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR3[ERROR3["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR3[ERROR3["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR3[ERROR3["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR3[ERROR3["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR3[ERROR3["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR3[ERROR3["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR3[ERROR3["PAUSED"] = 21] = "PAUSED"; - ERROR3[ERROR3["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR3[ERROR3["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR3[ERROR3["USER"] = 24] = "USER"; - })(ERROR2 = exports2.ERROR || (exports2.ERROR = {})); - var TYPE; - (function(TYPE2) { - TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; - TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; - TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; - })(TYPE = exports2.TYPE || (exports2.TYPE = {})); - var FLAGS; - (function(FLAGS2) { - FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; - FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; - FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; - FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; - })(FLAGS = exports2.FLAGS || (exports2.FLAGS = {})); - var LENIENT_FLAGS; - (function(LENIENT_FLAGS2) { - LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; - })(LENIENT_FLAGS = exports2.LENIENT_FLAGS || (exports2.LENIENT_FLAGS = {})); - var METHODS; - (function(METHODS2) { - METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; - METHODS2[METHODS2["GET"] = 1] = "GET"; - METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; - METHODS2[METHODS2["POST"] = 3] = "POST"; - METHODS2[METHODS2["PUT"] = 4] = "PUT"; - METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; - METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; - METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; - METHODS2[METHODS2["COPY"] = 8] = "COPY"; - METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; - METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; - METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; - METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; - METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; - METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; - METHODS2[METHODS2["BIND"] = 16] = "BIND"; - METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; - METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; - METHODS2[METHODS2["ACL"] = 19] = "ACL"; - METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; - METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; - METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; - METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; - METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; - METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; - METHODS2[METHODS2["LINK"] = 31] = "LINK"; - METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; - METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; - METHODS2[METHODS2["PRI"] = 34] = "PRI"; - METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; - METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; - METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; - METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; - METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; - METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; - })(METHODS = exports2.METHODS || (exports2.METHODS = {})); - exports2.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS["M-SEARCH"], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE - ]; - exports2.METHODS_ICE = [ - METHODS.SOURCE - ]; - exports2.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST - ]; - exports2.METHOD_MAP = utils_1.enumToMap(METHODS); - exports2.H_METHOD_MAP = {}; - Object.keys(exports2.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports2.H_METHOD_MAP[key] = exports2.METHOD_MAP[key]; - } - }); - var FINISH; - (function(FINISH2) { - FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; - FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; - })(FINISH = exports2.FINISH || (exports2.FINISH = {})); - exports2.ALPHA = []; - for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { - exports2.ALPHA.push(String.fromCharCode(i)); - exports2.ALPHA.push(String.fromCharCode(i + 32)); - } - exports2.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 - }; - exports2.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15, - a: 10, - b: 11, - c: 12, - d: 13, - e: 14, - f: 15 - }; - exports2.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" - ]; - exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); - exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; - exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); - exports2.STRICT_URL_CHAR = [ - "!", - '"', - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" - ].concat(exports2.ALPHANUM); - exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); - for (let i = 128; i <= 255; i++) { - exports2.URL_CHAR.push(i); - } - exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); - exports2.STRICT_TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" - ].concat(exports2.ALPHANUM); - exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); - exports2.HEADER_CHARS = [" "]; - for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports2.HEADER_CHARS.push(i); - } - } - exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); - exports2.MAJOR = exports2.NUM_MAP; - exports2.MINOR = exports2.MAJOR; - var HEADER_STATE; - (function(HEADER_STATE2) { - HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; - })(HEADER_STATE = exports2.HEADER_STATE || (exports2.HEADER_STATE = {})); - exports2.SPECIAL_HEADERS = { - "connection": HEADER_STATE.CONNECTION, - "content-length": HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": HEADER_STATE.CONNECTION, - "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, - "upgrade": HEADER_STATE.UPGRADE - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp-wasm.js -var require_llhttp_wasm = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { - "use strict"; - var { Buffer: Buffer3 } = require("node:buffer"); - module2.exports = Buffer3.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW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AEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkG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EBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js -var require_llhttp_simd_wasm = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { - "use strict"; - var { Buffer: Buffer3 } = require("node:buffer"); - module2.exports = Buffer3.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2Fz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DQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0Ab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IQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMM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gAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQs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gAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0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489d.zip/node_modules/undici/lib/web/fetch/constants.js -var require_constants4 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/constants.js"(exports2, module2) { - "use strict"; - var corsSafeListedMethods = ( - /** @type {const} */ - ["GET", "HEAD", "POST"] - ); - var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); - var nullBodyStatus = ( - /** @type {const} */ - [101, 204, 205, 304] - ); - var redirectStatus = ( - /** @type {const} */ - [301, 302, 303, 307, 308] - ); - var redirectStatusSet = new Set(redirectStatus); - var badPorts = ( - /** @type {const} */ - [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "4190", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6679", - "6697", - "10080" - ] - ); - var badPortsSet = new Set(badPorts); - var referrerPolicy = ( - /** @type {const} */ - [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ] - ); - var referrerPolicySet = new Set(referrerPolicy); - var requestRedirect = ( - /** @type {const} */ - ["follow", "manual", "error"] - ); - var safeMethods = ( - /** @type {const} */ - ["GET", "HEAD", "OPTIONS", "TRACE"] - ); - var safeMethodsSet = new Set(safeMethods); - var requestMode = ( - /** @type {const} */ - ["navigate", "same-origin", "no-cors", "cors"] - ); - var requestCredentials = ( - /** @type {const} */ - ["omit", "same-origin", "include"] - ); - var requestCache = ( - /** @type {const} */ - [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ] - ); - var requestBodyHeader = ( - /** @type {const} */ - [ - "content-encoding", - "content-language", - "content-location", - "content-type", - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - "content-length" - ] - ); - var requestDuplex = ( - /** @type {const} */ - [ - "half" - ] - ); - var forbiddenMethods = ( - /** @type {const} */ - ["CONNECT", "TRACE", "TRACK"] - ); - var forbiddenMethodsSet = new Set(forbiddenMethods); - var subresource = ( - /** @type {const} */ - [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" - ] - ); - var subresourceSet = new Set(subresource); - module2.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/global.js -var require_global = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/global.js"(exports2, module2) { - "use strict"; - var globalOrigin = Symbol.for("undici.globalOrigin.1"); - function getGlobalOrigin() { - return globalThis[globalOrigin]; - } - function setGlobalOrigin(newOrigin) { - if (newOrigin === void 0) { - Object.defineProperty(globalThis, globalOrigin, { - value: void 0, - writable: true, - enumerable: false, - configurable: false - }); - return; - } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - } - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); - } - module2.exports = { - getGlobalOrigin, - setGlobalOrigin - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/data-url.js -var require_data_url = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var encoder = new TextEncoder(); - var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; - var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; - var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; - var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; - function dataURLProcessor(dataURL) { - assert5(dataURL.protocol === "data:"); - let input = URLSerializer(dataURL, true); - input = input.slice(5); - const position = { position: 0 }; - let mimeType = collectASequenceOfCodePointsFast( - ",", - input, - position - ); - const mimeTypeLength = mimeType.length; - mimeType = removeASCIIWhitespace(mimeType, true, true); - if (position.position >= input.length) { - return "failure"; - } - position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode(encodedBody); - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = isomorphicDecode(body); - body = forgivingBase64(stringBody); - if (body === "failure") { - return "failure"; - } - mimeType = mimeType.slice(0, -6); - mimeType = mimeType.replace(/(\u0020)+$/, ""); - mimeType = mimeType.slice(0, -1); - } - if (mimeType.startsWith(";")) { - mimeType = "text/plain" + mimeType; - } - let mimeTypeRecord = parseMIMEType(mimeType); - if (mimeTypeRecord === "failure") { - mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); - } - return { mimeType: mimeTypeRecord, body }; - } - function URLSerializer(url, excludeFragment = false) { - if (!excludeFragment) { - return url.href; - } - const href = url.href; - const hashLength = url.hash.length; - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); - if (!hashLength && href.endsWith("#")) { - return serialized.slice(0, -1); - } - return serialized; - } - function collectASequenceOfCodePoints(condition, input, position) { - let result = ""; - while (position.position < input.length && condition(input[position.position])) { - result += input[position.position]; - position.position++; - } - return result; - } - function collectASequenceOfCodePointsFast(char, input, position) { - const idx = input.indexOf(char, position.position); - const start = position.position; - if (idx === -1) { - position.position = input.length; - return input.slice(start); - } - position.position = idx; - return input.slice(start, position.position); - } - function stringPercentDecode(input) { - const bytes = encoder.encode(input); - return percentDecode(bytes); - } - function isHexCharByte(byte) { - return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; - } - function hexByteToNumber(byte) { - return ( - // 0-9 - byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55 - ); - } - function percentDecode(input) { - const length = input.length; - const output = new Uint8Array(length); - let j = 0; - for (let i = 0; i < length; ++i) { - const byte = input[i]; - if (byte !== 37) { - output[j++] = byte; - } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) { - output[j++] = 37; - } else { - output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); - i += 2; - } - } - return length === j ? output : output.subarray(0, j); - } - function parseMIMEType(input) { - input = removeHTTPWhitespace(input, true, true); - const position = { position: 0 }; - const type = collectASequenceOfCodePointsFast( - "/", - input, - position - ); - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return "failure"; - } - if (position.position > input.length) { - return "failure"; - } - position.position++; - let subtype = collectASequenceOfCodePointsFast( - ";", - input, - position - ); - subtype = removeHTTPWhitespace(subtype, false, true); - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return "failure"; - } - const typeLowercase = type.toLowerCase(); - const subtypeLowercase = subtype.toLowerCase(); - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: /* @__PURE__ */ new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - }; - while (position.position < input.length) { - position.position++; - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - (char) => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ); - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ";" && char !== "=", - input, - position - ); - parameterName = parameterName.toLowerCase(); - if (position.position < input.length) { - if (input[position.position] === ";") { - continue; - } - position.position++; - } - if (position.position > input.length) { - break; - } - let parameterValue = null; - if (input[position.position] === '"') { - parameterValue = collectAnHTTPQuotedString(input, position, true); - collectASequenceOfCodePointsFast( - ";", - input, - position - ); - } else { - parameterValue = collectASequenceOfCodePointsFast( - ";", - input, - position - ); - parameterValue = removeHTTPWhitespace(parameterValue, false, true); - if (parameterValue.length === 0) { - continue; - } - } - if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { - mimeType.parameters.set(parameterName, parameterValue); - } - } - return mimeType; - } - function forgivingBase64(data) { - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); - let dataLength = data.length; - if (dataLength % 4 === 0) { - if (data.charCodeAt(dataLength - 1) === 61) { - --dataLength; - if (data.charCodeAt(dataLength - 1) === 61) { - --dataLength; - } - } - } - if (dataLength % 4 === 1) { - return "failure"; - } - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return "failure"; - } - const buffer = Buffer.from(data, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - } - function collectAnHTTPQuotedString(input, position, extractValue) { - const positionStart = position.position; - let value = ""; - assert5(input[position.position] === '"'); - position.position++; - while (true) { - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== "\\", - input, - position - ); - if (position.position >= input.length) { - break; - } - const quoteOrBackslash = input[position.position]; - position.position++; - if (quoteOrBackslash === "\\") { - if (position.position >= input.length) { - value += "\\"; - break; - } - value += input[position.position]; - position.position++; - } else { - assert5(quoteOrBackslash === '"'); - break; - } - } - if (extractValue) { - return value; - } - return input.slice(positionStart, position.position); - } - function serializeAMimeType(mimeType) { - assert5(mimeType !== "failure"); - const { parameters, essence } = mimeType; - let serialization = essence; - for (let [name2, value] of parameters.entries()) { - serialization += ";"; - serialization += name2; - serialization += "="; - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - value = value.replace(/(\\|")/g, "\\$1"); - value = '"' + value; - value += '"'; - } - serialization += value; - } - return serialization; - } - function isHTTPWhiteSpace(char) { - return char === 13 || char === 10 || char === 9 || char === 32; - } - function removeHTTPWhitespace(str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace); - } - function isASCIIWhitespace(char) { - return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; - } - function removeASCIIWhitespace(str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace); - } - function removeChars(str, leading, trailing, predicate) { - let lead = 0; - let trail = str.length - 1; - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; - } - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; - } - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); - } - function isomorphicDecode(input) { - const length = input.length; - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input); - } - let result = ""; - let i = 0; - let addition = (2 << 15) - 1; - while (i < length) { - if (i + addition > length) { - addition = length - i; - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); - } - return result; - } - function minimizeSupportedMimeType(mimeType) { - switch (mimeType.essence) { - case "application/ecmascript": - case "application/javascript": - case "application/x-ecmascript": - case "application/x-javascript": - case "text/ecmascript": - case "text/javascript": - case "text/javascript1.0": - case "text/javascript1.1": - case "text/javascript1.2": - case "text/javascript1.3": - case "text/javascript1.4": - case "text/javascript1.5": - case "text/jscript": - case "text/livescript": - case "text/x-ecmascript": - case "text/x-javascript": - return "text/javascript"; - case "application/json": - case "text/json": - return "application/json"; - case "image/svg+xml": - return "image/svg+xml"; - case "text/xml": - case "application/xml": - return "application/xml"; - } - if (mimeType.subtype.endsWith("+json")) { - return "application/json"; - } - if (mimeType.subtype.endsWith("+xml")) { - return "application/xml"; - } - return ""; - } - module2.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/webidl.js -var require_webidl = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/webidl.js"(exports2, module2) { - "use strict"; - var { types, inspect } = require("node:util"); - var { markAsUncloneable } = require("node:worker_threads"); - var { toUSVString } = require_util(); - var webidl = {}; - webidl.converters = {}; - webidl.util = {}; - webidl.errors = {}; - webidl.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); - }; - webidl.errors.conversionFailed = function(context) { - const plural2 = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to${plural2}: ${context.types.join(", ")}.`; - return webidl.errors.exception({ - header: context.prefix, - message - }); - }; - webidl.errors.invalidArgument = function(context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }); - }; - webidl.brandCheck = function(V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError("Illegal invocation"); - err.code = "ERR_INVALID_THIS"; - throw err; - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError("Illegal invocation"); - err.code = "ERR_INVALID_THIS"; - throw err; - } - } - }; - webidl.argumentLengthCheck = function({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, - header: ctx - }); - } - }; - webidl.illegalConstructor = function() { - throw webidl.errors.exception({ - header: "TypeError", - message: "Illegal constructor" - }); - }; - webidl.util.Type = function(V) { - switch (typeof V) { - case "undefined": - return "Undefined"; - case "boolean": - return "Boolean"; - case "string": - return "String"; - case "symbol": - return "Symbol"; - case "number": - return "Number"; - case "bigint": - return "BigInt"; - case "function": - case "object": { - if (V === null) { - return "Null"; - } - return "Object"; - } - } - }; - webidl.util.markAsUncloneable = markAsUncloneable || (() => { - }); - webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { - let upperBound; - let lowerBound; - if (bitLength === 64) { - upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") { - lowerBound = 0; - } else { - lowerBound = Math.pow(-2, 53) + 1; - } - } else if (signedness === "unsigned") { - lowerBound = 0; - upperBound = Math.pow(2, bitLength) - 1; - } else { - lowerBound = Math.pow(-2, bitLength) - 1; - upperBound = Math.pow(2, bitLength - 1) - 1; - } - let x = Number(V); - if (x === 0) { - x = 0; - } - if (opts?.enforceRange === true) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - throw webidl.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }); - } - x = webidl.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); - } - return x; - } - if (!Number.isNaN(x) && opts?.clamp === true) { - x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x); - } else { - x = Math.ceil(x); - } - return x; - } - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - return 0; - } - x = webidl.util.IntegerPart(x); - x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength); - } - return x; - }; - webidl.util.IntegerPart = function(n) { - const r = Math.floor(Math.abs(n)); - if (n < 0) { - return -1 * r; - } - return r; - }; - webidl.util.Stringify = function(V) { - const type = webidl.util.Type(V); - switch (type) { - case "Symbol": - return `Symbol(${V.description})`; - case "Object": - return inspect(V); - case "String": - return `"${V}"`; - default: - return `${V}`; - } - }; - webidl.sequenceConverter = function(converter) { - return (V, prefix, argument, Iterable) => { - if (webidl.util.Type(V) !== "Object") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }); - } - const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq = []; - let index = 0; - if (method === void 0 || typeof method.next !== "function") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }); - } - while (true) { - const { done, value } = method.next(); - if (done) { - break; - } - seq.push(converter(value, prefix, `${argument}[${index++}]`)); - } - return seq; - }; - }; - webidl.recordConverter = function(keyConverter, valueConverter) { - return (O, prefix, argument) => { - if (webidl.util.Type(O) !== "Object") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }); - } - const result = {}; - if (!types.isProxy(O)) { - const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; - for (const key of keys2) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); - result[typedKey] = typedValue; - } - return result; - } - const keys = Reflect.ownKeys(O); - for (const key of keys) { - const desc2 = Reflect.getOwnPropertyDescriptor(O, key); - if (desc2?.enumerable) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); - result[typedKey] = typedValue; - } - } - return result; - }; - }; - webidl.interfaceConverter = function(i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }); - } - return V; - }; - }; - webidl.dictionaryConverter = function(converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary); - const dict = {}; - if (type === "Null" || type === "Undefined") { - return dict; - } else if (type !== "Object") { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - } - for (const options of converters) { - const { key, defaultValue, required, converter } = options; - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }); - } - } - let value = dictionary[key]; - const hasDefault = Object.hasOwn(options, "defaultValue"); - if (hasDefault && value !== null) { - value ??= defaultValue(); - } - if (required || hasDefault || value !== void 0) { - value = converter(value, prefix, `${argument}.${key}`); - if (options.allowedValues && !options.allowedValues.includes(value)) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - } - dict[key] = value; - } - } - return dict; - }; - }; - webidl.nullableConverter = function(converter) { - return (V, prefix, argument) => { - if (V === null) { - return V; - } - return converter(V, prefix, argument); - }; - }; - webidl.converters.DOMString = function(V, prefix, argument, opts) { - if (V === null && opts?.legacyNullToEmptyString) { - return ""; - } - if (typeof V === "symbol") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }); - } - return String(V); - }; - webidl.converters.ByteString = function(V, prefix, argument) { - const x = webidl.converters.DOMString(V, prefix, argument); - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ); - } - } - return x; - }; - webidl.converters.USVString = toUSVString; - webidl.converters.boolean = function(V) { - const x = Boolean(V); - return x; - }; - webidl.converters.any = function(V) { - return V; - }; - webidl.converters["long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); - return x; - }; - webidl.converters["unsigned long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); - return x; - }; - webidl.converters["unsigned long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); - return x; - }; - webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { - const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); - return x; - }; - webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ["ArrayBuffer"] - }); - } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); - } - return V; - }; - webidl.converters.TypedArray = function(V, T, prefix, name2, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name2} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }); - } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); - } - return V; - }; - webidl.converters.DataView = function(V, prefix, name2, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name2} is not a DataView.` - }); - } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); - } - return V; - }; - webidl.converters.BufferSource = function(V, prefix, name2, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name2, { ...opts, allowShared: false }); - } - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name2, { ...opts, allowShared: false }); - } - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name2, { ...opts, allowShared: false }); - } - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name2} ("${webidl.util.Stringify(V)}")`, - types: ["BufferSource"] - }); - }; - webidl.converters["sequence"] = webidl.sequenceConverter( - webidl.converters.ByteString - ); - webidl.converters["sequence>"] = webidl.sequenceConverter( - webidl.converters["sequence"] - ); - webidl.converters["record"] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString - ); - module2.exports = { - webidl - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/util.js -var require_util3 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/util.js"(exports2, module2) { - "use strict"; - var { Transform } = require("node:stream"); - var zlib = require("node:zlib"); - var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants4(); - var { getGlobalOrigin } = require_global(); - var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); - var { performance } = require("node:perf_hooks"); - var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util(); - var assert5 = require("node:assert"); - var { isUint8Array } = require("node:util/types"); - var { webidl } = require_webidl(); - var supportedHashes = []; - var crypto; - try { - crypto = require("node:crypto"); - const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); - } catch { - } - function responseURL(response) { - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); - } - function responseLocationURL(response, requestFragment) { - if (!redirectStatusSet.has(response.status)) { - return null; - } - let location = response.headersList.get("location", true); - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - location = normalizeBinaryStringToUtf8(location); - } - location = new URL(location, responseURL(response)); - } - if (location && !location.hash) { - location.hash = requestFragment; - } - return location; - } - function isValidEncodedURL(url) { - for (let i = 0; i < url.length; ++i) { - const code2 = url.charCodeAt(i); - if (code2 > 126 || // Non-US-ASCII + DEL - code2 < 32) { - return false; - } - } - return true; - } - function normalizeBinaryStringToUtf8(value) { - return Buffer.from(value, "binary").toString("utf8"); - } - function requestCurrentURL(request) { - return request.urlList[request.urlList.length - 1]; - } - function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return "blocked"; - } - return "allowed"; - } - function isErrorLike(object) { - return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); - } - function isValidReasonPhrase(statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i); - if (!(c === 9 || // HTAB - c >= 32 && c <= 126 || // SP / VCHAR - c >= 128 && c <= 255)) { - return false; - } - } - return true; - } - var isValidHeaderName = isValidHTTPToken; - function isValidHeaderValue(potentialValue) { - return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; - } - function setRequestReferrerPolicyOnRedirect(request, actualResponse) { - const { headersList } = actualResponse; - const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); - let policy = ""; - if (policyHeader.length > 0) { - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim(); - if (referrerPolicyTokens.has(token)) { - policy = token; - break; - } - } - } - if (policy !== "") { - request.referrerPolicy = policy; - } - } - function crossOriginResourcePolicyCheck() { - return "allowed"; - } - function corsCheck() { - return "success"; - } - function TAOCheck() { - return "success"; - } - function appendFetchMetadata(httpRequest) { - let header = null; - header = httpRequest.mode; - httpRequest.headersList.set("sec-fetch-mode", header, true); - } - function appendRequestOriginHeader(request) { - let serializedOrigin = request.origin; - if (serializedOrigin === "client" || serializedOrigin === void 0) { - return; - } - if (request.responseTainting === "cors" || request.mode === "websocket") { - request.headersList.append("origin", serializedOrigin, true); - } else if (request.method !== "GET" && request.method !== "HEAD") { - switch (request.referrerPolicy) { - case "no-referrer": - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null; - } - break; - case "same-origin": - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null; - } - break; - default: - } - request.headersList.append("origin", serializedOrigin, true); - } - } - function coarsenTime(timestamp, crossOriginIsolatedCapability) { - return timestamp; - } - function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - }; - } - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - }; - } - function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability); - } - function createOpaqueTimingInfo(timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; - } - function makePolicyContainer() { - return { - referrerPolicy: "strict-origin-when-cross-origin" - }; - } - function clonePolicyContainer(policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - }; - } - function determineRequestsReferrer(request) { - const policy = request.referrerPolicy; - assert5(policy); - let referrerSource = null; - if (request.referrer === "client") { - const globalOrigin = getGlobalOrigin(); - if (!globalOrigin || globalOrigin.origin === "null") { - return "no-referrer"; - } - referrerSource = new URL(globalOrigin); - } else if (request.referrer instanceof URL) { - referrerSource = request.referrer; - } - let referrerURL = stripURLForReferrer(referrerSource); - const referrerOrigin = stripURLForReferrer(referrerSource, true); - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin; - } - const areSameOrigin = sameOrigin(request, referrerURL); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); - switch (policy) { - case "origin": - return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); - case "unsafe-url": - return referrerURL; - case "same-origin": - return areSameOrigin ? referrerOrigin : "no-referrer"; - case "origin-when-cross-origin": - return areSameOrigin ? referrerURL : referrerOrigin; - case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL(request); - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL; - } - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return "no-referrer"; - } - return referrerOrigin; - } - case "strict-origin": - // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case "no-referrer-when-downgrade": - // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - default: - return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; - } - } - function stripURLForReferrer(url, originOnly) { - assert5(url instanceof URL); - url = new URL(url); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { - return "no-referrer"; - } - url.username = ""; - url.password = ""; - url.hash = ""; - if (originOnly) { - url.pathname = ""; - url.search = ""; - } - return url; - } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { - return false; - } - if (url.href === "about:blank" || url.href === "about:srcdoc") { - return true; - } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); - function isOriginPotentiallyTrustworthy(origin) { - if (origin == null || origin === "null") return false; - const originAsURL = new URL(origin); - if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { - return true; - } - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.")) || originAsURL.hostname.endsWith(".localhost")) { - return true; - } - return false; - } - } - function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { - return true; - } - const parsedMetadata = parseMetadata(metadataList); - if (parsedMetadata === "no metadata") { - return true; - } - if (parsedMetadata.length === 0) { - return true; - } - const strongest = getStrongestMetadata(parsedMetadata); - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); - for (const item of metadata) { - const algorithm = item.algo; - const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue[actualValue.length - 1] === "=") { - if (actualValue[actualValue.length - 2] === "=") { - actualValue = actualValue.slice(0, -2); - } else { - actualValue = actualValue.slice(0, -1); - } - } - if (compareBase64Mixed(actualValue, expectedValue)) { - return true; - } - } - return false; - } - var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - function parseMetadata(metadata) { - const result = []; - let empty = true; - for (const token of metadata.split(" ")) { - empty = false; - const parsedToken = parseHashWithOptions.exec(token); - if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { - continue; - } - const algorithm = parsedToken.groups.algo.toLowerCase(); - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups); - } - } - if (empty === true) { - return "no metadata"; - } - return result; - } - function getStrongestMetadata(metadataList) { - let algorithm = metadataList[0].algo; - if (algorithm[3] === "5") { - return algorithm; - } - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i]; - if (metadata.algo[3] === "5") { - algorithm = "sha512"; - break; - } else if (algorithm[3] === "3") { - continue; - } else if (metadata.algo[3] === "3") { - algorithm = "sha384"; - } - } - return algorithm; - } - function filterMetadataListByAlgorithm(metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList; - } - let pos2 = 0; - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos2++] = metadataList[i]; - } - } - metadataList.length = pos2; - return metadataList; - } - function compareBase64Mixed(actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false; - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { - continue; - } - return false; - } - } - return true; - } - function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { - } - function sameOrigin(A, B) { - if (A.origin === B.origin && A.origin === "null") { - return true; - } - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true; - } - return false; - } - function createDeferredPromise() { - let res; - let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - return { promise, resolve: res, reject: rej }; - } - function isAborted(fetchParams) { - return fetchParams.controller.state === "aborted"; - } - function isCancelled(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; - } - function normalizeMethod(method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; - } - function serializeJavascriptValueToJSONString(value) { - const result = JSON.stringify(value); - if (result === void 0) { - throw new TypeError("Value is not JSON serializable"); - } - assert5(typeof result === "string"); - return result; - } - var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); - function createIterator(name2, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target; - /** @type {'key' | 'value' | 'key+value'} */ - #kind; - /** @type {number} */ - #index; - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor(target, kind) { - this.#target = target; - this.#kind = kind; - this.#index = 0; - } - next() { - if (typeof this !== "object" || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name2} Iterator.` - ); - } - const index = this.#index; - const values = this.#target[kInternalIterator]; - const len = values.length; - if (index >= len) { - return { - value: void 0, - done: true - }; - } - const { [keyIndex]: key, [valueIndex]: value } = values[index]; - this.#index = index + 1; - let result; - switch (this.#kind) { - case "key": - result = key; - break; - case "value": - result = value; - break; - case "key+value": - result = [key, value]; - break; - } - return { - value: result, - done: false - }; - } - } - delete FastIterableIterator.prototype.constructor; - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name2} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }); - return function(target, kind) { - return new FastIterableIterator(target, kind); - }; - } - function iteratorMixin(name2, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name2, kInternalIterator, keyIndex, valueIndex); - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys() { - webidl.brandCheck(this, object); - return makeIterator(this, "key"); - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values() { - webidl.brandCheck(this, object); - return makeIterator(this, "value"); - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries() { - webidl.brandCheck(this, object); - return makeIterator(this, "key+value"); - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach(callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object); - webidl.argumentLengthCheck(arguments, 1, `${name2}.forEach`); - if (typeof callbackfn !== "function") { - throw new TypeError( - `Failed to execute 'forEach' on '${name2}': parameter 1 is not of type 'Function'.` - ); - } - for (const { 0: key, 1: value } of makeIterator(this, "key+value")) { - callbackfn.call(thisArg, value, key, this); - } - } - } - }; - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }); - } - async function fullyReadBody(body, processBody, processBodyError) { - const successSteps = processBody; - const errorSteps = processBodyError; - let reader; - try { - reader = body.stream.getReader(); - } catch (e) { - errorSteps(e); - return; - } - try { - successSteps(await readAllBytes(reader)); - } catch (e) { - errorSteps(e); - } - } - function isReadableStreamLike(stream) { - return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; - } - function readableStreamClose(controller) { - try { - controller.close(); - controller.byobRequest?.respond(0); - } catch (err) { - if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) { - throw err; - } - } - } - var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; - function isomorphicEncode(input) { - assert5(!invalidIsomorphicEncodeValueRegex.test(input)); - return input; - } - async function readAllBytes(reader) { - const bytes = []; - let byteLength = 0; - while (true) { - const { done, value: chunk } = await reader.read(); - if (done) { - return Buffer.concat(bytes, byteLength); - } - if (!isUint8Array(chunk)) { - throw new TypeError("Received non-Uint8Array chunk"); - } - bytes.push(chunk); - byteLength += chunk.length; - } - } - function urlIsLocal(url) { - assert5("protocol" in url); - const protocol = url.protocol; - return protocol === "about:" || protocol === "blob:" || protocol === "data:"; - } - function urlHasHttpsScheme(url) { - return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; - } - function urlIsHttpHttpsScheme(url) { - assert5("protocol" in url); - const protocol = url.protocol; - return protocol === "http:" || protocol === "https:"; - } - function simpleRangeHeaderValue(value, allowWhitespace) { - const data = value; - if (!data.startsWith("bytes")) { - return "failure"; - } - const position = { position: 5 }; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - if (data.charCodeAt(position.position) !== 61) { - return "failure"; - } - position.position++; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code2 = char.charCodeAt(0); - return code2 >= 48 && code2 <= 57; - }, - data, - position - ); - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - if (data.charCodeAt(position.position) !== 45) { - return "failure"; - } - position.position++; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code2 = char.charCodeAt(0); - return code2 >= 48 && code2 <= 57; - }, - data, - position - ); - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; - if (position.position < data.length) { - return "failure"; - } - if (rangeEndValue === null && rangeStartValue === null) { - return "failure"; - } - if (rangeStartValue > rangeEndValue) { - return "failure"; - } - return { rangeStartValue, rangeEndValue }; - } - function buildContentRange(rangeStart, rangeEnd, fullLength) { - let contentRange = "bytes "; - contentRange += isomorphicEncode(`${rangeStart}`); - contentRange += "-"; - contentRange += isomorphicEncode(`${rangeEnd}`); - contentRange += "/"; - contentRange += isomorphicEncode(`${fullLength}`); - return contentRange; - } - var InflateStream = class extends Transform { - #zlibOptions; - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor(zlibOptions) { - super(); - this.#zlibOptions = zlibOptions; - } - _transform(chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback(); - return; - } - this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate(this.#zlibOptions) : zlib.createInflateRaw(this.#zlibOptions); - this._inflateStream.on("data", this.push.bind(this)); - this._inflateStream.on("end", () => this.push(null)); - this._inflateStream.on("error", (err) => this.destroy(err)); - } - this._inflateStream.write(chunk, encoding, callback); - } - _final(callback) { - if (this._inflateStream) { - this._inflateStream.end(); - this._inflateStream = null; - } - callback(); - } - }; - function createInflate(zlibOptions) { - return new InflateStream(zlibOptions); - } - function extractMimeType(headers) { - let charset = null; - let essence = null; - let mimeType = null; - const values = getDecodeSplit("content-type", headers); - if (values === null) { - return "failure"; - } - for (const value of values) { - const temporaryMimeType = parseMIMEType(value); - if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") { - continue; - } - mimeType = temporaryMimeType; - if (mimeType.essence !== essence) { - charset = null; - if (mimeType.parameters.has("charset")) { - charset = mimeType.parameters.get("charset"); - } - essence = mimeType.essence; - } else if (!mimeType.parameters.has("charset") && charset !== null) { - mimeType.parameters.set("charset", charset); - } - } - if (mimeType == null) { - return "failure"; - } - return mimeType; - } - function gettingDecodingSplitting(value) { - const input = value; - const position = { position: 0 }; - const values = []; - let temporaryValue = ""; - while (position.position < input.length) { - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ",", - input, - position - ); - if (position.position < input.length) { - if (input.charCodeAt(position.position) === 34) { - temporaryValue += collectAnHTTPQuotedString( - input, - position - ); - if (position.position < input.length) { - continue; - } - } else { - assert5(input.charCodeAt(position.position) === 44); - position.position++; - } - } - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); - values.push(temporaryValue); - temporaryValue = ""; - } - return values; - } - function getDecodeSplit(name2, list2) { - const value = list2.get(name2, true); - if (value === null) { - return null; - } - return gettingDecodingSplitting(value); - } - var textDecoder = new TextDecoder(); - function utf8DecodeBytes(buffer) { - if (buffer.length === 0) { - return ""; - } - if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { - buffer = buffer.subarray(3); - } - const output = textDecoder.decode(buffer); - return output; - } - var EnvironmentSettingsObjectBase = class { - get baseUrl() { - return getGlobalOrigin(); - } - get origin() { - return this.baseUrl?.origin; - } - policyContainer = makePolicyContainer(); - }; - var EnvironmentSettingsObject = class { - settingsObject = new EnvironmentSettingsObjectBase(); - }; - var environmentSettingsObject = new EnvironmentSettingsObject(); - module2.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/symbols.js -var require_symbols2 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/symbols.js"(exports2, module2) { - "use strict"; - module2.exports = { - kUrl: Symbol("url"), - kHeaders: Symbol("headers"), - kSignal: Symbol("signal"), - kState: Symbol("state"), - kDispatcher: Symbol("dispatcher") - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/file.js -var require_file = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/file.js"(exports2, module2) { - "use strict"; - var { Blob: Blob2, File } = require("node:buffer"); - var { kState } = require_symbols2(); - var { webidl } = require_webidl(); - var FileLike = class _FileLike { - constructor(blobLike, fileName, options = {}) { - const n = fileName; - const t = options.type; - const d = options.lastModified ?? Date.now(); - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - }; - } - stream(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.stream(...args); - } - arrayBuffer(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.arrayBuffer(...args); - } - slice(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.slice(...args); - } - text(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.text(...args); - } - get size() { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.size; - } - get type() { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.type; - } - get name() { - webidl.brandCheck(this, _FileLike); - return this[kState].name; - } - get lastModified() { - webidl.brandCheck(this, _FileLike); - return this[kState].lastModified; - } - get [Symbol.toStringTag]() { - return "File"; - } - }; - webidl.converters.Blob = webidl.interfaceConverter(Blob2); - function isFileLike(object) { - return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; - } - module2.exports = { FileLike, isFileLike }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata.js -var require_formdata = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata.js"(exports2, module2) { - "use strict"; - var { isBlobLike, iteratorMixin } = require_util3(); - var { kState } = require_symbols2(); - var { kEnumerableProperty } = require_util(); - var { FileLike, isFileLike } = require_file(); - var { webidl } = require_webidl(); - var { File: NativeFile } = require("node:buffer"); - var nodeUtil = require("node:util"); - var File = globalThis.File ?? NativeFile; - var FormData = class _FormData { - constructor(form) { - webidl.util.markAsUncloneable(this); - if (form !== void 0) { - throw webidl.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["undefined"] - }); - } - this[kState] = []; - } - append(name2, value, filename = void 0) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.append"; - webidl.argumentLengthCheck(arguments, 2, prefix); - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ); - } - name2 = webidl.converters.USVString(name2, prefix, "name"); - value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); - filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; - const entry = makeEntry(name2, value, filename); - this[kState].push(entry); - } - delete(name2) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.delete"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name2 = webidl.converters.USVString(name2, prefix, "name"); - this[kState] = this[kState].filter((entry) => entry.name !== name2); - } - get(name2) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.get"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name2 = webidl.converters.USVString(name2, prefix, "name"); - const idx = this[kState].findIndex((entry) => entry.name === name2); - if (idx === -1) { - return null; - } - return this[kState][idx].value; - } - getAll(name2) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.getAll"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name2 = webidl.converters.USVString(name2, prefix, "name"); - return this[kState].filter((entry) => entry.name === name2).map((entry) => entry.value); - } - has(name2) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.has"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name2 = webidl.converters.USVString(name2, prefix, "name"); - return this[kState].findIndex((entry) => entry.name === name2) !== -1; - } - set(name2, value, filename = void 0) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.set"; - webidl.argumentLengthCheck(arguments, 2, prefix); - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ); - } - name2 = webidl.converters.USVString(name2, prefix, "name"); - value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); - filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; - const entry = makeEntry(name2, value, filename); - const idx = this[kState].findIndex((entry2) => entry2.name === name2); - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name2) - ]; - } else { - this[kState].push(entry); - } - } - [nodeUtil.inspect.custom](depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value); - } else { - a[b.name] = [a[b.name], b.value]; - } - } else { - a[b.name] = b.value; - } - return a; - }, { __proto__: null }); - options.depth ??= depth; - options.colors ??= true; - const output = nodeUtil.formatWithOptions(options, state); - return `FormData ${output.slice(output.indexOf("]") + 2)}`; - } - }; - iteratorMixin("FormData", FormData, kState, "name", "value"); - Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: "FormData", - configurable: true - } - }); - function makeEntry(name2, value, filename) { - if (typeof value === "string") { - } else { - if (!isFileLike(value)) { - value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); - } - if (filename !== void 0) { - const options = { - type: value.type, - lastModified: value.lastModified - }; - value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); - } - } - return { name: name2, value }; - } - module2.exports = { FormData, makeEntry }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata-parser.js -var require_formdata_parser = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports2, module2) { - "use strict"; - var { isUSVString, bufferToLowerCasedHeaderName } = require_util(); - var { utf8DecodeBytes } = require_util3(); - var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); - var { isFileLike } = require_file(); - var { makeEntry } = require_formdata(); - var assert5 = require("node:assert"); - var { File: NodeFile } = require("node:buffer"); - var File = globalThis.File ?? NodeFile; - var formDataNameBuffer = Buffer.from('form-data; name="'); - var filenameBuffer = Buffer.from("; filename"); - var dd = Buffer.from("--"); - var ddcrlf = Buffer.from("--\r\n"); - function isAsciiString(chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~127) !== 0) { - return false; - } - } - return true; - } - function validateBoundary(boundary) { - const length = boundary.length; - if (length < 27 || length > 70) { - return false; - } - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i); - if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { - return false; - } - } - return true; - } - function multipartFormDataParser(input, mimeType) { - assert5(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); - const boundaryString = mimeType.parameters.get("boundary"); - if (boundaryString === void 0) { - return "failure"; - } - const boundary = Buffer.from(`--${boundaryString}`, "utf8"); - const entryList = []; - const position = { position: 0 }; - while (input[position.position] === 13 && input[position.position + 1] === 10) { - position.position += 2; - } - let trailing = input.length; - while (input[trailing - 1] === 10 && input[trailing - 2] === 13) { - trailing -= 2; - } - if (trailing !== input.length) { - input = input.subarray(0, trailing); - } - while (true) { - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length; - } else { - return "failure"; - } - if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) { - return entryList; - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) { - return "failure"; - } - position.position += 2; - const result = parseMultipartFormDataHeaders(input, position); - if (result === "failure") { - return "failure"; - } - let { name: name2, filename, contentType, encoding } = result; - position.position += 2; - let body; - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); - if (boundaryIndex === -1) { - return "failure"; - } - body = input.subarray(position.position, boundaryIndex - 4); - position.position += body.length; - if (encoding === "base64") { - body = Buffer.from(body.toString(), "base64"); - } - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) { - return "failure"; - } else { - position.position += 2; - } - let value; - if (filename !== null) { - contentType ??= "text/plain"; - if (!isAsciiString(contentType)) { - contentType = ""; - } - value = new File([body], filename, { type: contentType }); - } else { - value = utf8DecodeBytes(Buffer.from(body)); - } - assert5(isUSVString(name2)); - assert5(typeof value === "string" && isUSVString(value) || isFileLike(value)); - entryList.push(makeEntry(name2, value, filename)); - } - } - function parseMultipartFormDataHeaders(input, position) { - let name2 = null; - let filename = null; - let contentType = null; - let encoding = null; - while (true) { - if (input[position.position] === 13 && input[position.position + 1] === 10) { - if (name2 === null) { - return "failure"; - } - return { name: name2, filename, contentType, encoding }; - } - let headerName = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13 && char !== 58, - input, - position - ); - headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return "failure"; - } - if (input[position.position] !== 58) { - return "failure"; - } - position.position++; - collectASequenceOfBytes( - (char) => char === 32 || char === 9, - input, - position - ); - switch (bufferToLowerCasedHeaderName(headerName)) { - case "content-disposition": { - name2 = filename = null; - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return "failure"; - } - position.position += 17; - name2 = parseMultipartFormDataName(input, position); - if (name2 === null) { - return "failure"; - } - if (bufferStartsWith(input, filenameBuffer, position)) { - let check = position.position + filenameBuffer.length; - if (input[check] === 42) { - position.position += 1; - check += 1; - } - if (input[check] !== 61 || input[check + 1] !== 34) { - return "failure"; - } - position.position += 12; - filename = parseMultipartFormDataName(input, position); - if (filename === null) { - return "failure"; - } - } - break; - } - case "content-type": { - let headerValue = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13, - input, - position - ); - headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); - contentType = isomorphicDecode(headerValue); - break; - } - case "content-transfer-encoding": { - let headerValue = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13, - input, - position - ); - headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); - encoding = isomorphicDecode(headerValue); - break; - } - default: { - collectASequenceOfBytes( - (char) => char !== 10 && char !== 13, - input, - position - ); - } - } - if (input[position.position] !== 13 && input[position.position + 1] !== 10) { - return "failure"; - } else { - position.position += 2; - } - } - } - function parseMultipartFormDataName(input, position) { - assert5(input[position.position - 1] === 34); - let name2 = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13 && char !== 34, - input, - position - ); - if (input[position.position] !== 34) { - return null; - } else { - position.position++; - } - name2 = new TextDecoder().decode(name2).replace(/%0A/ig, "\n").replace(/%0D/ig, "\r").replace(/%22/g, '"'); - return name2; - } - function collectASequenceOfBytes(condition, input, position) { - let start = position.position; - while (start < input.length && condition(input[start])) { - ++start; - } - return input.subarray(position.position, position.position = start); - } - function removeChars(buf, leading, trailing, predicate) { - let lead = 0; - let trail = buf.length - 1; - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++; - } - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail--; - } - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); - } - function bufferStartsWith(buffer, start, position) { - if (buffer.length < start.length) { - return false; - } - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false; - } - } - return true; - } - module2.exports = { - multipartFormDataParser, - validateBoundary - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/body.js -var require_body = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/web/fetch/body.js"(exports2, module2) { - "use strict"; - var util = require_util(); - var { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes - } = require_util3(); - var { FormData } = require_formdata(); - var { kState } = require_symbols2(); - var { webidl } = require_webidl(); - var { Blob: Blob2 } = require("node:buffer"); - var assert5 = require("node:assert"); - var { isErrored, isDisturbed } = require("node:stream"); - var { isArrayBuffer } = require("node:util/types"); - var { serializeAMimeType } = require_data_url(); - var { multipartFormDataParser } = require_formdata_parser(); - var random; - try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); - } catch { - random = (max) => Math.floor(Math.random(max)); - } - var textEncoder = new TextEncoder(); - function noop3() { - } - var hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; - var streamRegistry; - if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref(); - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel("Response object has been garbage collected").catch(noop3); - } - }); - } - function extractBody(object, keepalive = false) { - let stream = null; - if (object instanceof ReadableStream) { - stream = object; - } else if (isBlobLike(object)) { - stream = object.stream(); - } else { - stream = new ReadableStream({ - async pull(controller) { - const buffer = typeof source === "string" ? textEncoder.encode(source) : source; - if (buffer.byteLength) { - controller.enqueue(buffer); - } - queueMicrotask(() => readableStreamClose(controller)); - }, - start() { - }, - type: "bytes" - }); - } - assert5(isReadableStreamLike(stream)); - let action = null; - let source = null; - let length = null; - let type = null; - if (typeof object === "string") { - source = object; - type = "text/plain;charset=UTF-8"; - } else if (object instanceof URLSearchParams) { - source = object.toString(); - type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object)) { - source = new Uint8Array(object.slice()); - } else if (ArrayBuffer.isView(object)) { - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r -Content-Disposition: form-data`; - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); - const blobParts = []; - const rn = new Uint8Array([13, 10]); - length = 0; - let hasUnknownSizeValue = false; - for (const [name2, value] of object) { - if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name2))}"\r -\r -${normalizeLinefeeds(value)}\r -`); - blobParts.push(chunk2); - length += chunk2.byteLength; - } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name2))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r -Content-Type: ${value.type || "application/octet-stream"}\r -\r -`); - blobParts.push(chunk2, value, rn); - if (typeof value.size === "number") { - length += chunk2.byteLength + value.size + rn.byteLength; - } else { - hasUnknownSizeValue = true; - } - } - } - const chunk = textEncoder.encode(`--${boundary}--\r -`); - blobParts.push(chunk); - length += chunk.byteLength; - if (hasUnknownSizeValue) { - length = null; - } - source = object; - action = async function* () { - for (const part of blobParts) { - if (part.stream) { - yield* part.stream(); - } else { - yield part; - } - } - }; - type = `multipart/form-data; boundary=${boundary}`; - } else if (isBlobLike(object)) { - source = object; - length = object.size; - if (object.type) { - type = object.type; - } - } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) { - throw new TypeError("keepalive"); - } - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - "Response body object should not be disturbed or locked" - ); - } - stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); - } - if (typeof source === "string" || util.isBuffer(source)) { - length = Buffer.byteLength(source); - } - if (action != null) { - let iterator; - stream = new ReadableStream({ - async start() { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull(controller) { - const { value, done } = await iterator.next(); - if (done) { - queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - } else { - if (!isErrored(stream)) { - const buffer = new Uint8Array(value); - if (buffer.byteLength) { - controller.enqueue(buffer); - } - } - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: "bytes" - }); - } - const body = { stream, source, length }; - return [body, type]; - } - function safelyExtractBody(object, keepalive = false) { - if (object instanceof ReadableStream) { - assert5(!util.isDisturbed(object), "The body has already been consumed."); - assert5(!object.locked, "The stream is locked."); - } - return extractBody(object, keepalive); - } - function cloneBody(instance, body) { - const [out1, out2] = body.stream.tee(); - body.stream = out1; - return { - stream: out2, - length: body.length, - source: body.source - }; - } - function throwIfAborted(state) { - if (state.aborted) { - throw new DOMException("The operation was aborted.", "AbortError"); - } - } - function bodyMixinMethods(instance) { - const methods = { - blob() { - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this); - if (mimeType === null) { - mimeType = ""; - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType); - } - return new Blob2([bytes], { type: mimeType }); - }, instance); - }, - arrayBuffer() { - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer; - }, instance); - }, - text() { - return consumeBody(this, utf8DecodeBytes, instance); - }, - json() { - return consumeBody(this, parseJSONFromBytes, instance); - }, - formData() { - return consumeBody(this, (value) => { - const mimeType = bodyMimeType(this); - if (mimeType !== null) { - switch (mimeType.essence) { - case "multipart/form-data": { - const parsed = multipartFormDataParser(value, mimeType); - if (parsed === "failure") { - throw new TypeError("Failed to parse body as FormData."); - } - const fd = new FormData(); - fd[kState] = parsed; - return fd; - } - case "application/x-www-form-urlencoded": { - const entries = new URLSearchParams(value.toString()); - const fd = new FormData(); - for (const [name2, value2] of entries) { - fd.append(name2, value2); - } - return fd; - } - } - } - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ); - }, instance); - }, - bytes() { - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes); - }, instance); - } - }; - return methods; - } - function mixinBody(prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)); - } - async function consumeBody(object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance); - if (bodyUnusable(object)) { - throw new TypeError("Body is unusable: Body has already been read"); - } - throwIfAborted(object[kState]); - const promise = createDeferredPromise(); - const errorSteps = (error) => promise.reject(error); - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)); - } catch (e) { - errorSteps(e); - } - }; - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)); - return promise.promise; - } - await fullyReadBody(object[kState].body, successSteps, errorSteps); - return promise.promise; - } - function bodyUnusable(object) { - const body = object[kState].body; - return body != null && (body.stream.locked || util.isDisturbed(body.stream)); - } - function parseJSONFromBytes(bytes) { - return JSON.parse(utf8DecodeBytes(bytes)); - } - function bodyMimeType(requestOrResponse) { - const headers = requestOrResponse[kState].headersList; - const mimeType = extractMimeType(headers); - if (mimeType === "failure") { - return null; - } - return mimeType; - } - module2.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable - }; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h1.js -var require_client_h1 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var util = require_util(); - var { channels } = require_diagnostics(); - var timers = require_timers(); - var { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError - } = require_errors(); - var { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext - } = require_symbols(); - var constants2 = require_constants3(); - var EMPTY_BUF = Buffer.alloc(0); - var FastBuffer = Buffer[Symbol.species]; - var addListener = util.addListener; - var removeAllListeners = util.removeAllListeners; - var extractBody; - async function lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; - let mod; - try { - mod = await WebAssembly.compile(require_llhttp_simd_wasm()); - } catch (e) { - mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); - } - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - wasm_on_url: (p, at, len) => { - return 0; - }, - wasm_on_status: (p, at, len) => { - assert5(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_begin: (p) => { - assert5(currentParser.ptr === p); - return currentParser.onMessageBegin() || 0; - }, - wasm_on_header_field: (p, at, len) => { - assert5(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_header_value: (p, at, len) => { - assert5(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert5(currentParser.ptr === p); - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p, at, len) => { - assert5(currentParser.ptr === p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_complete: (p) => { - assert5(currentParser.ptr === p); - return currentParser.onMessageComplete() || 0; - } - /* eslint-enable camelcase */ - } - }); - } - var llhttpInstance = null; - var llhttpPromise = lazyllhttp(); - llhttpPromise.catch(); - var currentParser = null; - var currentBufferRef = null; - var currentBufferSize = 0; - var currentBufferPtr = null; - var USE_NATIVE_TIMER = 0; - var USE_FAST_TIMER = 1; - var TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; - var TIMEOUT_BODY = 4 | USE_FAST_TIMER; - var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; - var Parser2 = class { - constructor(client, socket, { exports: exports3 }) { - assert5(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); - this.llhttp = exports3; - this.ptr = this.llhttp.llhttp_alloc(constants2.TYPE.RESPONSE); - this.client = client; - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = null; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[kMaxHeadersSize]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - this.connection = ""; - this.maxResponseSize = client[kMaxResponseSize]; - } - setTimeout(delay, type) { - if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { - if (this.timeout) { - timers.clearTimeout(this.timeout); - this.timeout = null; - } - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); - this.timeout.unref(); - } - } - this.timeoutValue = delay; - } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - this.timeoutType = type; - } - resume() { - if (this.socket.destroyed || !this.paused) { - return; - } - assert5(this.ptr != null); - assert5(currentParser == null); - this.llhttp.llhttp_resume(this.ptr); - assert5(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - this.paused = false; - this.execute(this.socket.read() || EMPTY_BUF); - this.readMore(); - } - readMore() { - while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) { - break; - } - this.execute(chunk); - } - } - execute(data) { - assert5(this.ptr != null); - assert5(currentParser == null); - assert5(!this.paused); - const { socket, llhttp } = this; - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr); - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096; - currentBufferPtr = llhttp.malloc(currentBufferSize); - } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); - try { - let ret; - try { - currentBufferRef = data; - currentParser = this; - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); - } catch (err) { - throw err; - } finally { - currentParser = null; - currentBufferRef = null; - } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants2.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)); - } else if (ret === constants2.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== constants2.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new HTTPParserError(message, constants2.ERROR[ret], data.slice(offset)); - } - } catch (err) { - util.destroy(socket, err); - } - } - destroy() { - assert5(this.ptr != null); - assert5(currentParser == null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - this.timeout && timers.clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; - } - onStatus(buf) { - this.statusText = buf.toString(); - } - onMessageBegin() { - const { socket, client } = this; - if (socket.destroyed) { - return -1; - } - const request = client[kQueue][client[kRunningIdx]]; - if (!request) { - return -1; - } - request.onResponseStarted(); - } - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) { - this.headers.push(buf); - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - } - this.trackHeader(buf.length); - } - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - } - const key = this.headers[len - 2]; - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key); - if (headerName === "keep-alive") { - this.keepAlive += buf.toString(); - } else if (headerName === "connection") { - this.connection += buf.toString(); - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { - this.contentLength += buf.toString(); - } - this.trackHeader(buf.length); - } - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()); - } - } - onUpgrade(head) { - const { upgrade, client, socket, headers, statusCode } = this; - assert5(upgrade); - assert5(client[kSocket] === socket); - assert5(!socket.destroyed); - assert5(!this.paused); - assert5((headers.length & 1) === 0); - const request = client[kQueue][client[kRunningIdx]]; - assert5(request); - assert5(request.upgrade || request.method === "CONNECT"); - this.statusCode = null; - this.statusText = ""; - this.shouldKeepAlive = null; - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[kParser].destroy(); - socket[kParser] = null; - socket[kClient] = null; - socket[kError] = null; - removeAllListeners(socket); - client[kSocket] = null; - client[kHTTPContext] = null; - client[kQueue][client[kRunningIdx]++] = null; - client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); - try { - request.onUpgrade(statusCode, headers, socket); - } catch (err) { - util.destroy(socket, err); - } - client[kResume](); - } - onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this; - if (socket.destroyed) { - return -1; - } - const request = client[kQueue][client[kRunningIdx]]; - if (!request) { - return -1; - } - assert5(!this.upgrade); - assert5(this.statusCode < 200); - if (statusCode === 100) { - util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); - return -1; - } - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); - return -1; - } - assert5(this.timeoutType === TIMEOUT_HEADERS); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. - request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; - this.setTimeout(bodyTimeout, TIMEOUT_BODY); - } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - if (request.method === "CONNECT") { - assert5(client[kRunning] === 1); - this.upgrade = true; - return 2; - } - if (upgrade) { - assert5(client[kRunning] === 1); - this.upgrade = true; - return 2; - } - assert5((this.headers.length & 1) === 0); - this.headers = []; - this.headersSize = 0; - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ); - if (timeout <= 0) { - socket[kReset] = true; - } else { - client[kKeepAliveTimeoutValue] = timeout; - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; - } - } else { - socket[kReset] = true; - } - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request.aborted) { - return -1; - } - if (request.method === "HEAD") { - return 1; - } - if (statusCode < 200) { - return 1; - } - if (socket[kBlocking]) { - socket[kBlocking] = false; - client[kResume](); - } - return pause ? constants2.ERROR.PAUSED : 0; - } - onBody(buf) { - const { client, socket, statusCode, maxResponseSize } = this; - if (socket.destroyed) { - return -1; - } - const request = client[kQueue][client[kRunningIdx]]; - assert5(request); - assert5(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - assert5(statusCode >= 200); - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()); - return -1; - } - this.bytesRead += buf.length; - if (request.onData(buf) === false) { - return constants2.ERROR.PAUSED; - } - } - onMessageComplete() { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1; - } - if (upgrade) { - return; - } - assert5(statusCode >= 100); - assert5((this.headers.length & 1) === 0); - const request = client[kQueue][client[kRunningIdx]]; - assert5(request); - this.statusCode = null; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - this.connection = ""; - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) { - return; - } - if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()); - return -1; - } - request.onComplete(headers); - client[kQueue][client[kRunningIdx]++] = null; - if (socket[kWriting]) { - assert5(client[kRunning] === 0); - util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; - } else if (socket[kReset] && client[kRunning] === 0) { - util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - setImmediate(() => client[kResume]()); - } else { - client[kResume](); - } - } - }; - function onParserTimeout(parser) { - const { socket, timeoutType, client, paused } = parser.deref(); - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert5(!paused, "cannot be paused while waiting for headers"); - util.destroy(socket, new HeadersTimeoutError()); - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()); - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert5(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); - util.destroy(socket, new InformationalError("socket idle timeout")); - } - } - async function connectH1(client, socket) { - client[kSocket] = socket; - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise; - llhttpPromise = null; - } - socket[kNoRef] = false; - socket[kWriting] = false; - socket[kReset] = false; - socket[kBlocking] = false; - socket[kParser] = new Parser2(client, socket, llhttpInstance); - addListener(socket, "error", function(err) { - assert5(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - const parser = this[kParser]; - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - this[kError] = err; - this[kClient][kOnError](err); - }); - addListener(socket, "readable", function() { - const parser = this[kParser]; - if (parser) { - parser.readMore(); - } - }); - addListener(socket, "end", function() { - const parser = this[kParser]; - if (parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); - }); - addListener(socket, "close", function() { - const client2 = this[kClient]; - const parser = this[kParser]; - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - } - this[kParser].destroy(); - this[kParser] = null; - } - const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); - client2[kSocket] = null; - client2[kHTTPContext] = null; - if (client2.destroyed) { - assert5(client2[kPending] === 0); - const requests = client2[kQueue].splice(client2[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request = requests[i]; - util.errorRequest(client2, request, err); - } - } else if (client2[kRunning] > 0 && err.code !== "UND_ERR_INFO") { - const request = client2[kQueue][client2[kRunningIdx]]; - client2[kQueue][client2[kRunningIdx]++] = null; - util.errorRequest(client2, request, err); - } - client2[kPendingIdx] = client2[kRunningIdx]; - assert5(client2[kRunning] === 0); - client2.emit("disconnect", client2[kUrl], [client2], err); - client2[kResume](); - }); - let closed = false; - socket.on("close", () => { - closed = true; - }); - return { - version: "h1", - defaultPipelining: 1, - write(...args) { - return writeH1(client, ...args); - }, - resume() { - resumeH1(client); - }, - destroy(err, callback) { - if (closed) { - queueMicrotask(callback); - } else { - socket.destroy(err).on("close", callback); - } - }, - get destroyed() { - return socket.destroyed; - }, - busy(request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true; - } - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - return true; - } - if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { - return true; - } - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - return true; - } - } - return false; - } - }; - } - function resumeH1(client) { - const socket = client[kSocket]; - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref(); - socket[kNoRef] = true; - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref(); - socket[kNoRef] = false; - } - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]]; - const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); - } - } - } - } - function shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function writeH1(client, request) { - const { method, path: path16, host, upgrade, blocking, reset } = request; - let { body, headers, contentLength } = request; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = require_body().extractBody; - } - const [bodyStream, contentType] = extractBody(body); - if (request.contentType == null) { - headers.push("content-type", contentType); - } - body = bodyStream.stream; - contentLength = bodyStream.length; - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push("content-type", body.type); - } - if (body && typeof body.read === "function") { - body.read(0); - } - const bodyLength = util.bodyLength(body); - contentLength = bodyLength ?? contentLength; - if (contentLength === null) { - contentLength = request.contentLength; - } - if (contentLength === 0 && !expectsPayload) { - contentLength = null; - } - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - const socket = client[kSocket]; - const abort = (err) => { - if (request.aborted || request.completed) { - return; - } - util.errorRequest(client, request, err || new RequestAbortedError()); - util.destroy(body); - util.destroy(socket, new InformationalError("aborted")); - }; - try { - request.onConnect(abort); - } catch (err) { - util.errorRequest(client, request, err); - } - if (request.aborted) { - return false; - } - if (method === "HEAD") { - socket[kReset] = true; - } - if (upgrade || method === "CONNECT") { - socket[kReset] = true; - } - if (reset != null) { - socket[kReset] = reset; - } - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true; - } - if (blocking) { - socket[kBlocking] = true; - } - let header = `${method} ${path16} HTTP/1.1\r -`; - if (typeof host === "string") { - header += `host: ${host}\r -`; - } else { - header += client[kHostHeader]; - } - if (upgrade) { - header += `connection: upgrade\r -upgrade: ${upgrade}\r -`; - } else if (client[kPipelining] && !socket[kReset]) { - header += "connection: keep-alive\r\n"; - } else { - header += "connection: close\r\n"; - } - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0]; - const val = headers[n + 1]; - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r -`; - } - } else { - header += `${key}: ${val}\r -`; - } - } - } - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }); - } - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); - } else if (util.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); - } else { - assert5(false); - } - return true; - } - function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert5(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - let finished = false; - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); - const onData = function(chunk) { - if (finished) { - return; - } - try { - if (!writer.write(chunk) && this.pause) { - this.pause(); - } - } catch (err) { - util.destroy(this, err); - } - }; - const onDrain = function() { - if (finished) { - return; - } - if (body.resume) { - body.resume(); - } - }; - const onClose = function() { - queueMicrotask(() => { - body.removeListener("error", onFinished); - }); - if (!finished) { - const err = new RequestAbortedError(); - queueMicrotask(() => onFinished(err)); - } - }; - const onFinished = function(err) { - if (finished) { - return; - } - finished = true; - assert5(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); - if (!err) { - try { - writer.end(); - } catch (er) { - err = er; - } - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { - util.destroy(body, err); - } else { - util.destroy(body); - } - }; - body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); - if (body.resume) { - body.resume(); - } - socket.on("drain", onDrain).on("error", onFinished); - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)); - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)); - } - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose); - } - } - function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r -\r -`, "latin1"); - } else { - assert5(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r -`, "latin1"); - } - } else if (util.isBuffer(body)) { - assert5(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "latin1"); - socket.write(body); - socket.uncork(); - request.onBodySent(body); - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true; - } - } - request.onRequestSent(); - client[kResume](); - } catch (err) { - abort(err); - } - } - async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert5(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } - const buffer = Buffer.from(await body.arrayBuffer()); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "latin1"); - socket.write(buffer); - socket.uncork(); - request.onBodySent(buffer); - request.onRequestSent(); - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true; - } - client[kResume](); - } catch (err) { - abort(err); - } - } - async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert5(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = () => new Promise((resolve, reject) => { - assert5(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } - }); - socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); - try { - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } - if (!writer.write(chunk)) { - await waitForDrain(); - } - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally { - socket.off("close", onDrain).off("drain", onDrain); - } - } - var AsyncWriter = class { - constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket; - this.request = request; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - this.abort = abort; - socket[kWriting] = true; - } - write(chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return false; - } - const len = Buffer.byteLength(chunk); - if (!len) { - return true; - } - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - socket.cork(); - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true; - } - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r -`, "latin1"); - } else { - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "latin1"); - } - } - if (contentLength === null) { - socket.write(`\r -${len.toString(16)}\r -`, "latin1"); - } - this.bytesWritten += len; - const ret = socket.write(chunk); - socket.uncork(); - request.onBodySent(chunk); - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } - } - } - return ret; - } - end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; - request.onRequestSent(); - socket[kWriting] = false; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return; - } - if (bytesWritten === 0) { - if (expectsPayload) { - socket.write(`${header}content-length: 0\r -\r -`, "latin1"); - } else { - socket.write(`${header}\r -`, "latin1"); - } - } else if (contentLength === null) { - socket.write("\r\n0\r\n\r\n", "latin1"); - } - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } else { - process.emitWarning(new RequestContentLengthMismatchError()); - } - } - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } - } - client[kResume](); - } - destroy(err) { - const { socket, client, abort } = this; - socket[kWriting] = false; - if (err) { - assert5(client[kRunning] <= 1, "pipeline should only contain this request"); - abort(err); - } - } - }; - module2.exports = connectH1; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h2.js -var require_client_h2 = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var { pipeline } = require("node:stream"); - var util = require_util(); - var { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError - } = require_errors(); - var { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext - } = require_symbols(); - var kOpenStreams = Symbol("open streams"); - var extractBody; - var h2ExperimentalWarned = false; - var http2; - try { - http2 = require("node:http2"); - } catch { - http2 = { constants: {} }; - } - var { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } - } = http2; - function parseH2Headers(headers) { - const result = []; - for (const [name2, value] of Object.entries(headers)) { - if (Array.isArray(value)) { - for (const subvalue of value) { - result.push(Buffer.from(name2), Buffer.from(subvalue)); - } - } else { - result.push(Buffer.from(name2), Buffer.from(value)); - } - } - return result; - } - async function connectH2(client, socket) { - client[kSocket] = socket; - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true; - process.emitWarning("H2 support is experimental, expect them to change at any time.", { - code: "UNDICI-H2" - }); - } - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }); - session[kOpenStreams] = 0; - session[kClient] = client; - session[kSocket] = socket; - util.addListener(session, "error", onHttp2SessionError); - util.addListener(session, "frameError", onHttp2FrameError); - util.addListener(session, "end", onHttp2SessionEnd); - util.addListener(session, "goaway", onHTTP2GoAway); - util.addListener(session, "close", function() { - const { [kClient]: client2 } = this; - const { [kSocket]: socket2 } = client2; - const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket2)); - client2[kHTTP2Session] = null; - if (client2.destroyed) { - assert5(client2[kPending] === 0); - const requests = client2[kQueue].splice(client2[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request = requests[i]; - util.errorRequest(client2, request, err); - } - } - }); - session.unref(); - client[kHTTP2Session] = session; - socket[kHTTP2Session] = session; - util.addListener(socket, "error", function(err) { - assert5(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kError] = err; - this[kClient][kOnError](err); - }); - util.addListener(socket, "end", function() { - util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); - }); - util.addListener(socket, "close", function() { - const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); - client[kSocket] = null; - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err); - } - client[kPendingIdx] = client[kRunningIdx]; - assert5(client[kRunning] === 0); - client.emit("disconnect", client[kUrl], [client], err); - client[kResume](); - }); - let closed = false; - socket.on("close", () => { - closed = true; - }); - return { - version: "h2", - defaultPipelining: Infinity, - write(...args) { - return writeH2(client, ...args); - }, - resume() { - resumeH2(client); - }, - destroy(err, callback) { - if (closed) { - queueMicrotask(callback); - } else { - socket.destroy(err).on("close", callback); - } - }, - get destroyed() { - return socket.destroyed; - }, - busy() { - return false; - } - }; - } - function resumeH2(client) { - const socket = client[kSocket]; - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref(); - client[kHTTP2Session].unref(); - } else { - socket.ref(); - client[kHTTP2Session].ref(); - } - } - } - function onHttp2SessionError(err) { - assert5(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kSocket][kError] = err; - this[kClient][kOnError](err); - } - function onHttp2FrameError(type, code2, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code2}`); - this[kSocket][kError] = err; - this[kClient][kOnError](err); - } - } - function onHttp2SessionEnd() { - const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); - this.destroy(err); - util.destroy(this[kSocket], err); - } - function onHTTP2GoAway(code2) { - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code2}`, util.getSocketInfo(this)); - const client = this[kClient]; - client[kSocket] = null; - client[kHTTPContext] = null; - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err); - this[kHTTP2Session] = null; - } - util.destroy(this[kSocket], err); - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]]; - client[kQueue][client[kRunningIdx]++] = null; - util.errorRequest(client, request, err); - client[kPendingIdx] = client[kRunningIdx]; - } - assert5(client[kRunning] === 0); - client.emit("disconnect", client[kUrl], [client], err); - client[kResume](); - } - function shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function writeH2(client, request) { - const session = client[kHTTP2Session]; - const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; - let { body } = request; - if (upgrade) { - util.errorRequest(client, request, new Error("Upgrade not supported for H2")); - return false; - } - const headers = {}; - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0]; - const val = reqHeaders[n + 1]; - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}`; - } else { - headers[key] = val[i]; - } - } - } else { - headers[key] = val; - } - } - let stream; - const { hostname, port } = client[kUrl]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; - headers[HTTP2_HEADER_METHOD] = method; - const abort = (err) => { - if (request.aborted || request.completed) { - return; - } - err = err || new RequestAbortedError(); - util.errorRequest(client, request, err); - if (stream != null) { - util.destroy(stream, err); - } - util.destroy(body, err); - client[kQueue][client[kRunningIdx]++] = null; - client[kResume](); - }; - try { - request.onConnect(abort); - } catch (err) { - util.errorRequest(client, request, err); - } - if (request.aborted) { - return false; - } - if (method === "CONNECT") { - session.ref(); - stream = session.request(headers, { endStream: false, signal }); - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream); - ++session[kOpenStreams]; - client[kQueue][client[kRunningIdx]++] = null; - } else { - stream.once("ready", () => { - request.onUpgrade(null, null, stream); - ++session[kOpenStreams]; - client[kQueue][client[kRunningIdx]++] = null; - }); - } - stream.once("close", () => { - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) session.unref(); - }); - return true; - } - headers[HTTP2_HEADER_PATH] = path16; - headers[HTTP2_HEADER_SCHEME] = "https"; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") { - body.read(0); - } - let contentLength = util.bodyLength(body); - if (util.isFormDataLike(body)) { - extractBody ??= require_body().extractBody; - const [bodyStream, contentType] = extractBody(body); - headers["content-type"] = contentType; - body = bodyStream.stream; - contentLength = bodyStream.length; - } - if (contentLength == null) { - contentLength = request.contentLength; - } - if (contentLength === 0 || !expectsPayload) { - contentLength = null; - } - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - if (contentLength != null) { - assert5(body, "no body must not have content length"); - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; - } - session.ref(); - const shouldEndStream = method === "GET" || method === "HEAD" || body === null; - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = "100-continue"; - stream = session.request(headers, { endStream: shouldEndStream, signal }); - stream.once("continue", writeBodyH2); - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }); - writeBodyH2(); - } - ++session[kOpenStreams]; - stream.once("response", (headers2) => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; - request.onResponseStarted(); - if (request.aborted) { - const err = new RequestAbortedError(); - util.errorRequest(client, request, err); - util.destroy(stream, err); - return; - } - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { - stream.pause(); - } - stream.on("data", (chunk) => { - if (request.onData(chunk) === false) { - stream.pause(); - } - }); - }); - stream.once("end", () => { - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]); - } - if (session[kOpenStreams] === 0) { - session.unref(); - } - abort(new InformationalError("HTTP/2: stream half-closed (remote)")); - client[kQueue][client[kRunningIdx]++] = null; - client[kPendingIdx] = client[kRunningIdx]; - client[kResume](); - }); - stream.once("close", () => { - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) { - session.unref(); - } - }); - stream.once("error", function(err) { - abort(err); - }); - stream.once("frameError", (type, code2) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code2}`)); - }); - return true; - function writeBodyH2() { - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ); - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ); - } else if (util.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ); - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ); - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ); - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ); - } else { - assert5(false); - } - } - } - function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert5(contentLength === body.byteLength, "buffer body must have content length"); - h2stream.cork(); - h2stream.write(body); - h2stream.uncork(); - h2stream.end(); - request.onBodySent(body); - } - if (!expectsPayload) { - socket[kReset] = true; - } - request.onRequestSent(); - client[kResume](); - } catch (error) { - abort(error); - } - } - function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert5(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err); - abort(err); - } else { - util.removeAllListeners(pipe); - request.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } - } - ); - util.addListener(pipe, "data", onPipeData); - function onPipeData(chunk) { - request.onBodySent(chunk); - } - } - async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert5(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } - const buffer = Buffer.from(await body.arrayBuffer()); - h2stream.cork(); - h2stream.write(buffer); - h2stream.uncork(); - h2stream.end(); - request.onBodySent(buffer); - request.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } catch (err) { - abort(err); - } - } - async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert5(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } - } - const waitForDrain = () => new Promise((resolve, reject) => { - assert5(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } - }); - h2stream.on("close", onDrain).on("drain", onDrain); - try { - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } - const res = h2stream.write(chunk); - request.onBodySent(chunk); - if (!res) { - await waitForDrain(); - } - } - h2stream.end(); - request.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } catch (err) { - abort(err); - } finally { - h2stream.off("close", onDrain).off("drain", onDrain); - } - } - module2.exports = connectH2; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/handler/redirect-handler.js -var require_redirect_handler = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/handler/redirect-handler.js"(exports2, module2) { - "use strict"; - var util = require_util(); - var { kBodyUsed } = require_symbols(); - var assert5 = require("node:assert"); - var { InvalidArgumentError } = require_errors(); - var EE3 = require("node:events"); - var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; - var kBody = Symbol("body"); - var BodyAsyncIterable = class { - constructor(body) { - this[kBody] = body; - this[kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - assert5(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody]; - } - }; - var RedirectHandler = class { - constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - util.validateHandler(handler, opts.method, opts.upgrade); - this.dispatch = dispatch; - this.location = null; - this.abort = null; - this.opts = { ...opts, maxRedirections: 0 }; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - this.redirectionLimitReached = false; - if (util.isStream(this.opts.body)) { - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body.on("data", function() { - assert5(false); - }); - } - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[kBodyUsed] = false; - EE3.prototype.on.call(this.opts.body, "data", function() { - this[kBodyUsed] = true; - }); - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } - } - onConnect(abort) { - this.abort = abort; - this.handler.onConnect(abort, { history: this.history }); - } - onUpgrade(statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket); - } - onError(error) { - this.handler.onError(error); - } - onHeaders(statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error("max redirects")); - } - this.redirectionLimitReached = true; - this.abort(new Error("max redirects")); - return; - } - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)); - } - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText); - } - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - this.opts.query = null; - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - this.opts.body = null; - } - } - onData(chunk) { - if (this.location) { - } else { - return this.handler.onData(chunk); - } - } - onComplete(trailers) { - if (this.location) { - this.location = null; - this.abort = null; - this.dispatch(this.opts, this); - } else { - this.handler.onComplete(trailers); - } - } - onBodySent(chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk); - } - } - }; - function parseLocation(statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null; - } - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") { - return headers[i + 1]; - } - } - } - function shouldRemoveHeader(header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === "host"; - } - if (removeContent && util.headerNameToString(header).startsWith("content-")) { - return true; - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name2 = util.headerNameToString(header); - return name2 === "authorization" || name2 === "cookie" || name2 === "proxy-authorization"; - } - return false; - } - function cleanRequestHeaders(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]); - } - } - } else if (headers && typeof headers === "object") { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]); - } - } - } else { - assert5(headers == null, "headers must be an object or an array"); - } - return ret; - } - module2.exports = RedirectHandler; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/interceptor/redirect-interceptor.js -var require_redirect_interceptor = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/interceptor/redirect-interceptor.js"(exports2, module2) { - "use strict"; - var RedirectHandler = require_redirect_handler(); - function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept(opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts; - if (!maxRedirections) { - return dispatch(opts, handler); - } - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); - opts = { ...opts, maxRedirections: 0 }; - return dispatch(opts, redirectHandler); - }; - }; - } - module2.exports = createRedirectInterceptor; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client.js -var require_client = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/client.js"(exports2, module2) { - "use strict"; - var assert5 = require("node:assert"); - var net = require("node:net"); - var http = require("node:http"); - var util = require_util(); - var { channels } = require_diagnostics(); - var Request = require_request(); - var DispatcherBase = require_dispatcher_base(); - var { - InvalidArgumentError, - InformationalError, - ClientDestroyedError - } = require_errors(); - var buildConnector = require_connect(); - var { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume - } = require_symbols(); - var connectH1 = require_client_h1(); - var connectH2 = require_client_h2(); - var deprecatedInterceptorWarned = false; - var kClosedResolve = Symbol("kClosedResolve"); - var noop3 = () => { - }; - function getPipelining(client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; - } - var Client = class extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor(url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect: connect2, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2 - } = {}) { - super(); - if (keepAlive !== void 0) { - throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); - } - if (socketTimeout !== void 0) { - throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - } - if (requestTimeout !== void 0) { - throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - } - if (idleTimeout !== void 0) { - throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); - } - if (maxKeepAliveTimeout !== void 0) { - throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - } - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError("invalid maxHeaderSize"); - } - if (socketPath != null && typeof socketPath !== "string") { - throw new InvalidArgumentError("invalid socketPath"); - } - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError("invalid connectTimeout"); - } - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveTimeout"); - } - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); - } - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); - } - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); - } - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); - } - if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); - } - if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError("localAddress must be valid string IP address"); - } - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError("maxResponseSize must be a positive number"); - } - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { - throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); - } - if (allowH2 != null && typeof allowH2 !== "boolean") { - throw new InvalidArgumentError("allowH2 must be a valid boolean value"); - } - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); - } - if (typeof connect2 !== "function") { - connect2 = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, - ...connect2 - }); - } - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client; - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true; - process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { - code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" - }); - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; - } - this[kUrl] = util.parseOrigin(url); - this[kConnector] = connect2; - this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; - this[kServerName] = null; - this[kLocalAddress] = localAddress != null ? localAddress : null; - this[kResuming] = 0; - this[kNeedDrain] = 0; - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r -`; - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; - this[kMaxRedirections] = maxRedirections; - this[kMaxRequests] = maxRequestsPerClient; - this[kClosedResolve] = null; - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; - this[kHTTPContext] = null; - this[kQueue] = []; - this[kRunningIdx] = 0; - this[kPendingIdx] = 0; - this[kResume] = (sync) => resume(this, sync); - this[kOnError] = (err) => onError(this, err); - } - get pipelining() { - return this[kPipelining]; - } - set pipelining(value) { - this[kPipelining] = value; - this[kResume](true); - } - get [kPending]() { - return this[kQueue].length - this[kPendingIdx]; - } - get [kRunning]() { - return this[kPendingIdx] - this[kRunningIdx]; - } - get [kSize]() { - return this[kQueue].length - this[kRunningIdx]; - } - get [kConnected]() { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; - } - get [kBusy]() { - return Boolean( - this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0 - ); - } - /* istanbul ignore: only used for test */ - [kConnect](cb) { - connect(this); - this.once("connect", cb); - } - [kDispatch](opts, handler) { - const origin = opts.origin || this[kUrl].origin; - const request = new Request(origin, opts, handler); - this[kQueue].push(request); - if (this[kResuming]) { - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - this[kResuming] = 1; - queueMicrotask(() => resume(this)); - } else { - this[kResume](true); - } - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2; - } - return this[kNeedDrain] < 2; - } - async [kClose]() { - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve; - } else { - resolve(null); - } - }); - } - async [kDestroy](err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]); - for (let i = 0; i < requests.length; i++) { - const request = requests[i]; - util.errorRequest(this, request, err); - } - const callback = () => { - if (this[kClosedResolve]) { - this[kClosedResolve](); - this[kClosedResolve] = null; - } - resolve(null); - }; - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback); - this[kHTTPContext] = null; - } else { - queueMicrotask(callback); - } - this[kResume](); - }); - } - }; - var createRedirectInterceptor = require_redirect_interceptor(); - function onError(client, err) { - if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert5(client[kPendingIdx] === client[kRunningIdx]); - const requests = client[kQueue].splice(client[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request = requests[i]; - util.errorRequest(client, request, err); - } - assert5(client[kSize] === 0); - } - } - async function connect(client) { - assert5(!client[kConnecting]); - assert5(!client[kHTTPContext]); - let { host, hostname, protocol, port } = client[kUrl]; - if (hostname[0] === "[") { - const idx = hostname.indexOf("]"); - assert5(idx !== -1); - const ip = hostname.substring(1, idx); - assert5(net.isIP(ip)); - hostname = ip; - } - client[kConnecting] = true; - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }); - } - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket2) => { - if (err) { - reject(err); - } else { - resolve(socket2); - } - }); - }); - if (client.destroyed) { - util.destroy(socket.on("error", noop3), new ClientDestroyedError()); - return; - } - assert5(socket); - try { - client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); - } catch (err) { - socket.destroy().on("error", noop3); - throw err; - } - client[kConnecting] = false; - socket[kCounter] = 0; - socket[kMaxRequests] = client[kMaxRequests]; - socket[kClient] = client; - socket[kError] = null; - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }); - } - client.emit("connect", client[kUrl], [client]); - } catch (err) { - if (client.destroyed) { - return; - } - client[kConnecting] = false; - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }); - } - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert5(client[kRunning] === 0); - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++]; - util.errorRequest(client, request, err); - } - } else { - onError(client, err); - } - client.emit("connectionError", client[kUrl], [client], err); - } - client[kResume](); - } - function emitDrain(client) { - client[kNeedDrain] = 0; - client.emit("drain", client[kUrl], [client]); - } - function resume(client, sync) { - if (client[kResuming] === 2) { - return; - } - client[kResuming] = 2; - _resume(client, sync); - client[kResuming] = 0; - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]); - client[kPendingIdx] -= client[kRunningIdx]; - client[kRunningIdx] = 0; - } - } - function _resume(client, sync) { - while (true) { - if (client.destroyed) { - assert5(client[kPending] === 0); - return; - } - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve](); - client[kClosedResolve] = null; - return; - } - if (client[kHTTPContext]) { - client[kHTTPContext].resume(); - } - if (client[kBusy]) { - client[kNeedDrain] = 2; - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1; - queueMicrotask(() => emitDrain(client)); - } else { - emitDrain(client); - } - continue; - } - if (client[kPending] === 0) { - return; - } - if (client[kRunning] >= (getPipelining(client) || 1)) { - return; - } - const request = client[kQueue][client[kPendingIdx]]; - if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return; - } - client[kServerName] = request.servername; - client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { - client[kHTTPContext] = null; - resume(client); - }); - } - if (client[kConnecting]) { - return; - } - if (!client[kHTTPContext]) { - connect(client); - return; - } - if (client[kHTTPContext].destroyed) { - return; - } - if (client[kHTTPContext].busy(request)) { - return; - } - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++; - } else { - client[kQueue].splice(client[kPendingIdx], 1); - } - } - } - module2.exports = Client; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool.js -var require_pool = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/pool.js"(exports2, module2) { - "use strict"; - var { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher - } = require_pool_base(); - var Client = require_client(); - var { - InvalidArgumentError - } = require_errors(); - var util = require_util(); - var { kUrl, kInterceptors } = require_symbols(); - var buildConnector = require_connect(); - var kOptions = Symbol("options"); - var kConnections = Symbol("connections"); - var kFactory = Symbol("factory"); - function defaultFactory(origin, opts) { - return new Client(origin, opts); - } - var Pool = class extends PoolBase { - constructor(origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - super(); - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError("invalid connections"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (typeof connect !== "function") { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, - ...connect - }); - } - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; - this[kConnections] = connections || null; - this[kUrl] = util.parseOrigin(origin); - this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error) => { - for (const target of targets) { - const idx = this[kClients].indexOf(target); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } - } - }); - } - [kGetDispatcher]() { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client; - } - } - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]); - this[kAddClient](dispatcher); - return dispatcher; - } - } - }; - module2.exports = Pool; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/agent.js -var require_agent = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/agent.js"(exports2, module2) { - "use strict"; - var { InvalidArgumentError } = require_errors(); - var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); - var DispatcherBase = require_dispatcher_base(); - var Pool = require_pool(); - var Client = require_client(); - var util = require_util(); - var createRedirectInterceptor = require_redirect_interceptor(); - var kOnConnect = Symbol("onConnect"); - var kOnDisconnect = Symbol("onDisconnect"); - var kOnConnectionError = Symbol("onConnectionError"); - var kMaxRedirections = Symbol("maxRedirections"); - var kOnDrain = Symbol("onDrain"); - var kFactory = Symbol("factory"); - var kOptions = Symbol("options"); - function defaultFactory(origin, opts) { - return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); - } - var Agent = class extends DispatcherBase { - constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super(); - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - if (connect && typeof connect !== "function") { - connect = { ...connect }; - } - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; - this[kOptions] = { ...util.deepClone(options), connect }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kMaxRedirections] = maxRedirections; - this[kFactory] = factory; - this[kClients] = /* @__PURE__ */ new Map(); - this[kOnDrain] = (origin, targets) => { - this.emit("drain", origin, [this, ...targets]); - }; - this[kOnConnect] = (origin, targets) => { - this.emit("connect", origin, [this, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - this.emit("disconnect", origin, [this, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - this.emit("connectionError", origin, [this, ...targets], err); - }; - } - get [kRunning]() { - let ret = 0; - for (const client of this[kClients].values()) { - ret += client[kRunning]; - } - return ret; - } - [kDispatch](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { - key = String(opts.origin); - } else { - throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); - } - let dispatcher = this[kClients].get(key); - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients].set(key, dispatcher); - } - return dispatcher.dispatch(opts, handler); - } - async [kClose]() { - const closePromises = []; - for (const client of this[kClients].values()) { - closePromises.push(client.close()); - } - this[kClients].clear(); - await Promise.all(closePromises); - } - async [kDestroy](err) { - const destroyPromises = []; - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)); - } - this[kClients].clear(); - await Promise.all(destroyPromises); - } - }; - module2.exports = Agent; - } -}); - -// .yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/proxy-agent.js -var require_proxy_agent = __commonJS({ - ".yarn/cache/undici-npm-6.22.0-4664dd0314-47903c489d.zip/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports2, module2) { - "use strict"; - var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); - var { URL: URL2 } = require("node:url"); - var Agent = require_agent(); - var Pool = require_pool(); - var DispatcherBase = require_dispatcher_base(); - var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); - var buildConnector = require_connect(); - var Client = require_client(); - var kAgent = Symbol("proxy agent"); - var kClient = Symbol("proxy client"); - var kProxyHeaders = Symbol("proxy headers"); - var kRequestTls = Symbol("request tls settings"); - var kProxyTls = Symbol("proxy tls settings"); - var kConnectEndpoint = Symbol("connect endpoint function"); - var kTunnelProxy = Symbol("tunnel proxy"); - function defaultProtocolPort(protocol) { - return protocol === "https:" ? 443 : 80; - } - function defaultFactory(origin, opts) { - return new Pool(origin, opts); - } - var noop3 = () => { - }; - function defaultAgentFactory(origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts); - } - return new Pool(origin, opts); - } - var Http1ProxyWrapper = class extends DispatcherBase { - #client; - constructor(proxyUrl, { headers = {}, connect, factory }) { - super(); - if (!proxyUrl) { - throw new InvalidArgumentError("Proxy URL is mandatory"); - } - this[kProxyHeaders] = headers; - if (factory) { - this.#client = factory(proxyUrl, { connect }); - } else { - this.#client = new Client(proxyUrl, { connect }); - } - } - [kDispatch](opts, handler) { - const onHeaders = handler.onHeaders; - handler.onHeaders = function(statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === "function") { - handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); - } - return; - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume); - }; - const { - origin, - path: path16 = "/", - headers = {} - } = opts; - opts.path = origin + path16; - if (!("host" in headers) && !("Host" in headers)) { - const { host } = new URL2(origin); - headers.host = host; - } - opts.headers = { ...this[kProxyHeaders], ...headers }; - return this.#client[kDispatch](opts, handler); - } - async [kClose]() { - return this.#client.close(); - } - async [kDestroy](err) { - return this.#client.destroy(err); - } - }; - var ProxyAgent2 = class extends DispatcherBase { - constructor(opts) { - super(); - if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) { - throw new InvalidArgumentError("Proxy uri is mandatory"); - } - const { clientFactory = defaultFactory } = opts; - if (typeof clientFactory !== "function") { - throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); - } - const { proxyTunnel = true } = opts; - const url = this.#getUrl(opts); - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; - this[kProxy] = { uri: href, protocol }; - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; - this[kRequestTls] = opts.requestTls; - this[kProxyTls] = opts.proxyTls; - this[kProxyHeaders] = opts.headers || {}; - this[kTunnelProxy] = proxyTunnel; - if (opts.auth && opts.token) { - throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); - } else if (opts.auth) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - } else if (opts.token) { - this[kProxyHeaders]["proxy-authorization"] = opts.token; - } else if (username && password) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - } - const connect = buildConnector({ ...opts.proxyTls }); - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); - const agentFactory = opts.factory || defaultAgentFactory; - const factory = (origin2, options) => { - const { protocol: protocol2 } = new URL2(origin2); - if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }); - } - return agentFactory(origin2, options); - }; - this[kClient] = clientFactory(url, { connect }); - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts2, callback) => { - let requestedPath = opts2.host; - if (!opts2.port) { - requestedPath += `:${defaultProtocolPort(opts2.protocol)}`; - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts2.signal, - headers: { - ...this[kProxyHeaders], - host: opts2.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }); - if (statusCode !== 200) { - socket.on("error", noop3).destroy(); - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); - } - if (opts2.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[kRequestTls]) { - servername = this[kRequestTls].servername; - } else { - servername = opts2.servername; - } - this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); - } catch (err) { - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - callback(new SecureProxyConnectionError(err)); - } else { - callback(err); - } - } - } - }); - } - dispatch(opts, handler) { - const headers = buildHeaders(opts.headers); - throwIfProxyAuthIsSent(headers); - if (headers && !("host" in headers) && !("Host" in headers)) { - const { host } = new URL2(opts.origin); - headers.host = host; - } - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ); - } - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl(opts) { - if (typeof opts === "string") { - return new URL2(opts); - } else if (opts instanceof URL2) { - return opts; - } else { - return new URL2(opts.uri); - } - } - async [kClose]() { - await this[kAgent].close(); - await this[kClient].close(); - } - async [kDestroy]() { - await this[kAgent].destroy(); - await this[kClient].destroy(); - } - }; - function buildHeaders(headers) { - if (Array.isArray(headers)) { - const headersPair = {}; - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1]; - } - return headersPair; - } - return headers; - } - function throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) { - throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); - } - } - module2.exports = ProxyAgent2; - } -}); - -// .yarn/cache/minipass-npm-7.1.2-3a5327d36d-b0fd20bb9f.zip/node_modules/minipass/dist/esm/index.js -var import_node_events, import_node_stream, import_node_string_decoder, proc, isStream, isReadable, isWritable, EOF, MAYBE_EMIT_END, EMITTED_END, EMITTING_END, EMITTED_ERROR, CLOSED, READ, FLUSH, FLUSHCHUNK, ENCODING, DECODER, FLOWING, PAUSED, RESUME, BUFFER, PIPES, BUFFERLENGTH, BUFFERPUSH, BUFFERSHIFT, OBJECTMODE, DESTROYED, ERROR, EMITDATA, EMITEND, EMITEND2, ASYNC, ABORT, ABORTED, SIGNAL, DATALISTENERS, DISCARDED, defer, nodefer, isEndish, isArrayBufferLike, isArrayBufferView, Pipe, PipeProxyErrors, isObjectModeOptions, isEncodingOptions, Minipass; -var init_esm = __esm({ - ".yarn/cache/minipass-npm-7.1.2-3a5327d36d-b0fd20bb9f.zip/node_modules/minipass/dist/esm/index.js"() { - import_node_events = require("node:events"); - import_node_stream = __toESM(require("node:stream"), 1); - import_node_string_decoder = require("node:string_decoder"); - proc = typeof process === "object" && process ? process : { - stdout: null, - stderr: null - }; - isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof import_node_stream.default || isReadable(s) || isWritable(s)); - isReadable = (s) => !!s && typeof s === "object" && s instanceof import_node_events.EventEmitter && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws - s.pipe !== import_node_stream.default.Writable.prototype.pipe; - isWritable = (s) => !!s && typeof s === "object" && s instanceof import_node_events.EventEmitter && typeof s.write === "function" && typeof s.end === "function"; - EOF = Symbol("EOF"); - MAYBE_EMIT_END = Symbol("maybeEmitEnd"); - EMITTED_END = Symbol("emittedEnd"); - EMITTING_END = Symbol("emittingEnd"); - EMITTED_ERROR = Symbol("emittedError"); - CLOSED = Symbol("closed"); - READ = Symbol("read"); - FLUSH = Symbol("flush"); - FLUSHCHUNK = Symbol("flushChunk"); - ENCODING = Symbol("encoding"); - DECODER = Symbol("decoder"); - FLOWING = Symbol("flowing"); - PAUSED = Symbol("paused"); - RESUME = Symbol("resume"); - BUFFER = Symbol("buffer"); - PIPES = Symbol("pipes"); - BUFFERLENGTH = Symbol("bufferLength"); - BUFFERPUSH = Symbol("bufferPush"); - BUFFERSHIFT = Symbol("bufferShift"); - OBJECTMODE = Symbol("objectMode"); - DESTROYED = Symbol("destroyed"); - ERROR = Symbol("error"); - EMITDATA = Symbol("emitData"); - EMITEND = Symbol("emitEnd"); - EMITEND2 = Symbol("emitEnd2"); - ASYNC = Symbol("async"); - ABORT = Symbol("abort"); - ABORTED = Symbol("aborted"); - SIGNAL = Symbol("signal"); - DATALISTENERS = Symbol("dataListeners"); - DISCARDED = Symbol("discarded"); - defer = (fn2) => Promise.resolve().then(fn2); - nodefer = (fn2) => fn2(); - isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish"; - isArrayBufferLike = (b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0; - isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b); - Pipe = class { - src; - dest; - opts; - ondrain; - constructor(src, dest, opts) { - this.src = src; - this.dest = dest; - this.opts = opts; - this.ondrain = () => src[RESUME](); - this.dest.on("drain", this.ondrain); - } - unpipe() { - this.dest.removeListener("drain", this.ondrain); - } - // only here for the prototype - /* c8 ignore start */ - proxyErrors(_er) { - } - /* c8 ignore stop */ - end() { - this.unpipe(); - if (this.opts.end) - this.dest.end(); - } - }; - PipeProxyErrors = class extends Pipe { - unpipe() { - this.src.removeListener("error", this.proxyErrors); - super.unpipe(); - } - constructor(src, dest, opts) { - super(src, dest, opts); - this.proxyErrors = (er) => dest.emit("error", er); - src.on("error", this.proxyErrors); - } - }; - isObjectModeOptions = (o) => !!o.objectMode; - isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== "buffer"; - Minipass = class extends import_node_events.EventEmitter { - [FLOWING] = false; - [PAUSED] = false; - [PIPES] = []; - [BUFFER] = []; - [OBJECTMODE]; - [ENCODING]; - [ASYNC]; - [DECODER]; - [EOF] = false; - [EMITTED_END] = false; - [EMITTING_END] = false; - [CLOSED] = false; - [EMITTED_ERROR] = null; - [BUFFERLENGTH] = 0; - [DESTROYED] = false; - [SIGNAL]; - [ABORTED] = false; - [DATALISTENERS] = 0; - [DISCARDED] = false; - /** - * true if the stream can be written - */ - writable = true; - /** - * true if the stream can be read - */ - readable = true; - /** - * If `RType` is Buffer, then options do not need to be provided. - * Otherwise, an options object must be provided to specify either - * {@link Minipass.SharedOptions.objectMode} or - * {@link Minipass.SharedOptions.encoding}, as appropriate. - */ - constructor(...args) { - const options = args[0] || {}; - super(); - if (options.objectMode && typeof options.encoding === "string") { - throw new TypeError("Encoding and objectMode may not be used together"); - } - if (isObjectModeOptions(options)) { - this[OBJECTMODE] = true; - this[ENCODING] = null; - } else if (isEncodingOptions(options)) { - this[ENCODING] = options.encoding; - this[OBJECTMODE] = false; - } else { - this[OBJECTMODE] = false; - this[ENCODING] = null; - } - this[ASYNC] = !!options.async; - this[DECODER] = this[ENCODING] ? new import_node_string_decoder.StringDecoder(this[ENCODING]) : null; - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, "buffer", { get: () => this[BUFFER] }); - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, "pipes", { get: () => this[PIPES] }); - } - const { signal } = options; - if (signal) { - this[SIGNAL] = signal; - if (signal.aborted) { - this[ABORT](); - } else { - signal.addEventListener("abort", () => this[ABORT]()); - } - } - } - /** - * The amount of data stored in the buffer waiting to be read. - * - * For Buffer strings, this will be the total byte length. - * For string encoding streams, this will be the string character length, - * according to JavaScript's `string.length` logic. - * For objectMode streams, this is a count of the items waiting to be - * emitted. - */ - get bufferLength() { - return this[BUFFERLENGTH]; - } - /** - * The `BufferEncoding` currently in use, or `null` - */ - get encoding() { - return this[ENCODING]; - } - /** - * @deprecated - This is a read only property - */ - set encoding(_enc) { - throw new Error("Encoding must be set at instantiation time"); - } - /** - * @deprecated - Encoding may only be set at instantiation time - */ - setEncoding(_enc) { - throw new Error("Encoding must be set at instantiation time"); - } - /** - * True if this is an objectMode stream - */ - get objectMode() { - return this[OBJECTMODE]; - } - /** - * @deprecated - This is a read-only property - */ - set objectMode(_om) { - throw new Error("objectMode must be set at instantiation time"); - } - /** - * true if this is an async stream - */ - get ["async"]() { - return this[ASYNC]; - } - /** - * Set to true to make this stream async. - * - * Once set, it cannot be unset, as this would potentially cause incorrect - * behavior. Ie, a sync stream can be made async, but an async stream - * cannot be safely made sync. - */ - set ["async"](a) { - this[ASYNC] = this[ASYNC] || !!a; - } - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true; - this.emit("abort", this[SIGNAL]?.reason); - this.destroy(this[SIGNAL]?.reason); - } - /** - * True if the stream has been aborted. - */ - get aborted() { - return this[ABORTED]; - } - /** - * No-op setter. Stream aborted status is set via the AbortSignal provided - * in the constructor options. - */ - set aborted(_) { - } - write(chunk, encoding, cb) { - if (this[ABORTED]) - return false; - if (this[EOF]) - throw new Error("write after end"); - if (this[DESTROYED]) { - this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })); - return true; - } - if (typeof encoding === "function") { - cb = encoding; - encoding = "utf8"; - } - if (!encoding) - encoding = "utf8"; - const fn2 = this[ASYNC] ? defer : nodefer; - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) { - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); - } else if (isArrayBufferLike(chunk)) { - chunk = Buffer.from(chunk); - } else if (typeof chunk !== "string") { - throw new Error("Non-contiguous data written to non-objectMode stream"); - } - } - if (this[OBJECTMODE]) { - if (this[FLOWING] && this[BUFFERLENGTH] !== 0) - this[FLUSH](true); - if (this[FLOWING]) - this.emit("data", chunk); - else - this[BUFFERPUSH](chunk); - if (this[BUFFERLENGTH] !== 0) - this.emit("readable"); - if (cb) - fn2(cb); - return this[FLOWING]; - } - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) - this.emit("readable"); - if (cb) - fn2(cb); - return this[FLOWING]; - } - if (typeof chunk === "string" && // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) { - chunk = Buffer.from(chunk, encoding); - } - if (Buffer.isBuffer(chunk) && this[ENCODING]) { - chunk = this[DECODER].write(chunk); - } - if (this[FLOWING] && this[BUFFERLENGTH] !== 0) - this[FLUSH](true); - if (this[FLOWING]) - this.emit("data", chunk); - else - this[BUFFERPUSH](chunk); - if (this[BUFFERLENGTH] !== 0) - this.emit("readable"); - if (cb) - fn2(cb); - return this[FLOWING]; - } - /** - * Low-level explicit read method. - * - * In objectMode, the argument is ignored, and one item is returned if - * available. - * - * `n` is the number of bytes (or in the case of encoding streams, - * characters) to consume. If `n` is not provided, then the entire buffer - * is returned, or `null` is returned if no data is available. - * - * If `n` is greater that the amount of data in the internal buffer, - * then `null` is returned. - */ - read(n) { - if (this[DESTROYED]) - return null; - this[DISCARDED] = false; - if (this[BUFFERLENGTH] === 0 || n === 0 || n && n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END](); - return null; - } - if (this[OBJECTMODE]) - n = null; - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - this[BUFFER] = [ - this[ENCODING] ? this[BUFFER].join("") : Buffer.concat(this[BUFFER], this[BUFFERLENGTH]) - ]; - } - const ret = this[READ](n || null, this[BUFFER][0]); - this[MAYBE_EMIT_END](); - return ret; - } - [READ](n, chunk) { - if (this[OBJECTMODE]) - this[BUFFERSHIFT](); - else { - const c = chunk; - if (n === c.length || n === null) - this[BUFFERSHIFT](); - else if (typeof c === "string") { - this[BUFFER][0] = c.slice(n); - chunk = c.slice(0, n); - this[BUFFERLENGTH] -= n; - } else { - this[BUFFER][0] = c.subarray(n); - chunk = c.subarray(0, n); - this[BUFFERLENGTH] -= n; - } - } - this.emit("data", chunk); - if (!this[BUFFER].length && !this[EOF]) - this.emit("drain"); - return chunk; - } - end(chunk, encoding, cb) { - if (typeof chunk === "function") { - cb = chunk; - chunk = void 0; - } - if (typeof encoding === "function") { - cb = encoding; - encoding = "utf8"; - } - if (chunk !== void 0) - this.write(chunk, encoding); - if (cb) - this.once("end", cb); - this[EOF] = true; - this.writable = false; - if (this[FLOWING] || !this[PAUSED]) - this[MAYBE_EMIT_END](); - return this; - } - // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) - return; - if (!this[DATALISTENERS] && !this[PIPES].length) { - this[DISCARDED] = true; - } - this[PAUSED] = false; - this[FLOWING] = true; - this.emit("resume"); - if (this[BUFFER].length) - this[FLUSH](); - else if (this[EOF]) - this[MAYBE_EMIT_END](); - else - this.emit("drain"); - } - /** - * Resume the stream if it is currently in a paused state - * - * If called when there are no pipe destinations or `data` event listeners, - * this will place the stream in a "discarded" state, where all data will - * be thrown away. The discarded state is removed if a pipe destination or - * data handler is added, if pause() is called, or if any synchronous or - * asynchronous iteration is started. - */ - resume() { - return this[RESUME](); - } - /** - * Pause the stream - */ - pause() { - this[FLOWING] = false; - this[PAUSED] = true; - this[DISCARDED] = false; - } - /** - * true if the stream has been forcibly destroyed - */ - get destroyed() { - return this[DESTROYED]; - } - /** - * true if the stream is currently in a flowing state, meaning that - * any writes will be immediately emitted. - */ - get flowing() { - return this[FLOWING]; - } - /** - * true if the stream is currently in a paused state - */ - get paused() { - return this[PAUSED]; - } - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] += 1; - else - this[BUFFERLENGTH] += chunk.length; - this[BUFFER].push(chunk); - } - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] -= 1; - else - this[BUFFERLENGTH] -= this[BUFFER][0].length; - return this[BUFFER].shift(); - } - [FLUSH](noDrain = false) { - do { - } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length); - if (!noDrain && !this[BUFFER].length && !this[EOF]) - this.emit("drain"); - } - [FLUSHCHUNK](chunk) { - this.emit("data", chunk); - return this[FLOWING]; - } - /** - * Pipe all data emitted by this stream into the destination provided. - * - * Triggers the flow of data. - */ - pipe(dest, opts) { - if (this[DESTROYED]) - return dest; - this[DISCARDED] = false; - const ended = this[EMITTED_END]; - opts = opts || {}; - if (dest === proc.stdout || dest === proc.stderr) - opts.end = false; - else - opts.end = opts.end !== false; - opts.proxyErrors = !!opts.proxyErrors; - if (ended) { - if (opts.end) - dest.end(); - } else { - this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts)); - if (this[ASYNC]) - defer(() => this[RESUME]()); - else - this[RESUME](); - } - return dest; - } - /** - * Fully unhook a piped destination stream. - * - * If the destination stream was the only consumer of this stream (ie, - * there are no other piped destinations or `'data'` event listeners) - * then the flow of data will stop until there is another consumer or - * {@link Minipass#resume} is explicitly called. - */ - unpipe(dest) { - const p = this[PIPES].find((p2) => p2.dest === dest); - if (p) { - if (this[PIPES].length === 1) { - if (this[FLOWING] && this[DATALISTENERS] === 0) { - this[FLOWING] = false; - } - this[PIPES] = []; - } else - this[PIPES].splice(this[PIPES].indexOf(p), 1); - p.unpipe(); - } - } - /** - * Alias for {@link Minipass#on} - */ - addListener(ev, handler) { - return this.on(ev, handler); - } - /** - * Mostly identical to `EventEmitter.on`, with the following - * behavior differences to prevent data loss and unnecessary hangs: - * - * - Adding a 'data' event handler will trigger the flow of data - * - * - Adding a 'readable' event handler when there is data waiting to be read - * will cause 'readable' to be emitted immediately. - * - * - Adding an 'endish' event handler ('end', 'finish', etc.) which has - * already passed will cause the event to be emitted immediately and all - * handlers removed. - * - * - Adding an 'error' event handler after an error has been emitted will - * cause the event to be re-emitted immediately with the error previously - * raised. - */ - on(ev, handler) { - const ret = super.on(ev, handler); - if (ev === "data") { - this[DISCARDED] = false; - this[DATALISTENERS]++; - if (!this[PIPES].length && !this[FLOWING]) { - this[RESUME](); - } - } else if (ev === "readable" && this[BUFFERLENGTH] !== 0) { - super.emit("readable"); - } else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev); - this.removeAllListeners(ev); - } else if (ev === "error" && this[EMITTED_ERROR]) { - const h = handler; - if (this[ASYNC]) - defer(() => h.call(this, this[EMITTED_ERROR])); - else - h.call(this, this[EMITTED_ERROR]); - } - return ret; - } - /** - * Alias for {@link Minipass#off} - */ - removeListener(ev, handler) { - return this.off(ev, handler); - } - /** - * Mostly identical to `EventEmitter.off` - * - * If a 'data' event handler is removed, and it was the last consumer - * (ie, there are no pipe destinations or other 'data' event listeners), - * then the flow of data will stop until there is another consumer or - * {@link Minipass#resume} is explicitly called. - */ - off(ev, handler) { - const ret = super.off(ev, handler); - if (ev === "data") { - this[DATALISTENERS] = this.listeners("data").length; - if (this[DATALISTENERS] === 0 && !this[DISCARDED] && !this[PIPES].length) { - this[FLOWING] = false; - } - } - return ret; - } - /** - * Mostly identical to `EventEmitter.removeAllListeners` - * - * If all 'data' event handlers are removed, and they were the last consumer - * (ie, there are no pipe destinations), then the flow of data will stop - * until there is another consumer or {@link Minipass#resume} is explicitly - * called. - */ - removeAllListeners(ev) { - const ret = super.removeAllListeners(ev); - if (ev === "data" || ev === void 0) { - this[DATALISTENERS] = 0; - if (!this[DISCARDED] && !this[PIPES].length) { - this[FLOWING] = false; - } - } - return ret; - } - /** - * true if the 'end' event has been emitted - */ - get emittedEnd() { - return this[EMITTED_END]; - } - [MAYBE_EMIT_END]() { - if (!this[EMITTING_END] && !this[EMITTED_END] && !this[DESTROYED] && this[BUFFER].length === 0 && this[EOF]) { - this[EMITTING_END] = true; - this.emit("end"); - this.emit("prefinish"); - this.emit("finish"); - if (this[CLOSED]) - this.emit("close"); - this[EMITTING_END] = false; - } - } - /** - * Mostly identical to `EventEmitter.emit`, with the following - * behavior differences to prevent data loss and unnecessary hangs: - * - * If the stream has been destroyed, and the event is something other - * than 'close' or 'error', then `false` is returned and no handlers - * are called. - * - * If the event is 'end', and has already been emitted, then the event - * is ignored. If the stream is in a paused or non-flowing state, then - * the event will be deferred until data flow resumes. If the stream is - * async, then handlers will be called on the next tick rather than - * immediately. - * - * If the event is 'close', and 'end' has not yet been emitted, then - * the event will be deferred until after 'end' is emitted. - * - * If the event is 'error', and an AbortSignal was provided for the stream, - * and there are no listeners, then the event is ignored, matching the - * behavior of node core streams in the presense of an AbortSignal. - * - * If the event is 'finish' or 'prefinish', then all listeners will be - * removed after emitting the event, to prevent double-firing. - */ - emit(ev, ...args) { - const data = args[0]; - if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) { - return false; - } else if (ev === "data") { - return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? (defer(() => this[EMITDATA](data)), true) : this[EMITDATA](data); - } else if (ev === "end") { - return this[EMITEND](); - } else if (ev === "close") { - this[CLOSED] = true; - if (!this[EMITTED_END] && !this[DESTROYED]) - return false; - const ret2 = super.emit("close"); - this.removeAllListeners("close"); - return ret2; - } else if (ev === "error") { - this[EMITTED_ERROR] = data; - super.emit(ERROR, data); - const ret2 = !this[SIGNAL] || this.listeners("error").length ? super.emit("error", data) : false; - this[MAYBE_EMIT_END](); - return ret2; - } else if (ev === "resume") { - const ret2 = super.emit("resume"); - this[MAYBE_EMIT_END](); - return ret2; - } else if (ev === "finish" || ev === "prefinish") { - const ret2 = super.emit(ev); - this.removeAllListeners(ev); - return ret2; - } - const ret = super.emit(ev, ...args); - this[MAYBE_EMIT_END](); - return ret; - } - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) - this.pause(); - } - const ret = this[DISCARDED] ? false : super.emit("data", data); - this[MAYBE_EMIT_END](); - return ret; - } - [EMITEND]() { - if (this[EMITTED_END]) - return false; - this[EMITTED_END] = true; - this.readable = false; - return this[ASYNC] ? (defer(() => this[EMITEND2]()), true) : this[EMITEND2](); - } - [EMITEND2]() { - if (this[DECODER]) { - const data = this[DECODER].end(); - if (data) { - for (const p of this[PIPES]) { - p.dest.write(data); - } - if (!this[DISCARDED]) - super.emit("data", data); - } - } - for (const p of this[PIPES]) { - p.end(); - } - const ret = super.emit("end"); - this.removeAllListeners("end"); - return ret; - } - /** - * Return a Promise that resolves to an array of all emitted data once - * the stream ends. - */ - async collect() { - const buf = Object.assign([], { - dataLength: 0 - }); - if (!this[OBJECTMODE]) - buf.dataLength = 0; - const p = this.promise(); - this.on("data", (c) => { - buf.push(c); - if (!this[OBJECTMODE]) - buf.dataLength += c.length; - }); - await p; - return buf; - } - /** - * Return a Promise that resolves to the concatenation of all emitted data - * once the stream ends. - * - * Not allowed on objectMode streams. - */ - async concat() { - if (this[OBJECTMODE]) { - throw new Error("cannot concat in objectMode"); - } - const buf = await this.collect(); - return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength); - } - /** - * Return a void Promise that resolves once the stream ends. - */ - async promise() { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error("stream destroyed"))); - this.on("error", (er) => reject(er)); - this.on("end", () => resolve()); - }); - } - /** - * Asynchronous `for await of` iteration. - * - * This will continue emitting all chunks until the stream terminates. - */ - [Symbol.asyncIterator]() { - this[DISCARDED] = false; - let stopped = false; - const stop = async () => { - this.pause(); - stopped = true; - return { value: void 0, done: true }; - }; - const next = () => { - if (stopped) - return stop(); - const res = this.read(); - if (res !== null) - return Promise.resolve({ done: false, value: res }); - if (this[EOF]) - return stop(); - let resolve; - let reject; - const onerr = (er) => { - this.off("data", ondata); - this.off("end", onend); - this.off(DESTROYED, ondestroy); - stop(); - reject(er); - }; - const ondata = (value) => { - this.off("error", onerr); - this.off("end", onend); - this.off(DESTROYED, ondestroy); - this.pause(); - resolve({ value, done: !!this[EOF] }); - }; - const onend = () => { - this.off("error", onerr); - this.off("data", ondata); - this.off(DESTROYED, ondestroy); - stop(); - resolve({ done: true, value: void 0 }); - }; - const ondestroy = () => onerr(new Error("stream destroyed")); - return new Promise((res2, rej) => { - reject = rej; - resolve = res2; - this.once(DESTROYED, ondestroy); - this.once("error", onerr); - this.once("end", onend); - this.once("data", ondata); - }); - }; - return { - next, - throw: stop, - return: stop, - [Symbol.asyncIterator]() { - return this; - } - }; - } - /** - * Synchronous `for of` iteration. - * - * The iteration will terminate when the internal buffer runs out, even - * if the stream has not yet terminated. - */ - [Symbol.iterator]() { - this[DISCARDED] = false; - let stopped = false; - const stop = () => { - this.pause(); - this.off(ERROR, stop); - this.off(DESTROYED, stop); - this.off("end", stop); - stopped = true; - return { done: true, value: void 0 }; - }; - const next = () => { - if (stopped) - return stop(); - const value = this.read(); - return value === null ? stop() : { done: false, value }; - }; - this.once("end", stop); - this.once(ERROR, stop); - this.once(DESTROYED, stop); - return { - next, - throw: stop, - return: stop, - [Symbol.iterator]() { - return this; - } - }; - } - /** - * Destroy a stream, preventing it from being used for any further purpose. - * - * If the stream has a `close()` method, then it will be called on - * destruction. - * - * After destruction, any attempt to write data, read data, or emit most - * events will be ignored. - * - * If an error argument is provided, then it will be emitted in an - * 'error' event. - */ - destroy(er) { - if (this[DESTROYED]) { - if (er) - this.emit("error", er); - else - this.emit(DESTROYED); - return this; - } - this[DESTROYED] = true; - this[DISCARDED] = true; - this[BUFFER].length = 0; - this[BUFFERLENGTH] = 0; - const wc = this; - if (typeof wc.close === "function" && !this[CLOSED]) - wc.close(); - if (er) - this.emit("error", er); - else - this.emit(DESTROYED); - return this; - } - /** - * Alias for {@link isStream} - * - * Former export location, maintained for backwards compatibility. - * - * @deprecated - */ - static get isStream() { - return isStream; - } - }; - } -}); - -// .yarn/cache/@isaacs-fs-minipass-npm-4.0.1-677026e841-c25b6dc159.zip/node_modules/@isaacs/fs-minipass/dist/esm/index.js -var import_events2, import_fs2, writev, _autoClose, _close, _ended, _fd, _finished, _flags, _flush, _handleChunk, _makeBuf, _mode, _needDrain, _onerror, _onopen, _onread, _onwrite, _open, _path, _pos, _queue, _read, _readSize, _reading, _remain, _size, _write, _writing, _defaultFlag, _errored, ReadStream, ReadStreamSync, WriteStream, WriteStreamSync; -var init_esm2 = __esm({ - ".yarn/cache/@isaacs-fs-minipass-npm-4.0.1-677026e841-c25b6dc159.zip/node_modules/@isaacs/fs-minipass/dist/esm/index.js"() { - import_events2 = __toESM(require("events"), 1); - import_fs2 = __toESM(require("fs"), 1); - init_esm(); - writev = import_fs2.default.writev; - _autoClose = Symbol("_autoClose"); - _close = Symbol("_close"); - _ended = Symbol("_ended"); - _fd = Symbol("_fd"); - _finished = Symbol("_finished"); - _flags = Symbol("_flags"); - _flush = Symbol("_flush"); - _handleChunk = Symbol("_handleChunk"); - _makeBuf = Symbol("_makeBuf"); - _mode = Symbol("_mode"); - _needDrain = Symbol("_needDrain"); - _onerror = Symbol("_onerror"); - _onopen = Symbol("_onopen"); - _onread = Symbol("_onread"); - _onwrite = Symbol("_onwrite"); - _open = Symbol("_open"); - _path = Symbol("_path"); - _pos = Symbol("_pos"); - _queue = Symbol("_queue"); - _read = Symbol("_read"); - _readSize = Symbol("_readSize"); - _reading = Symbol("_reading"); - _remain = Symbol("_remain"); - _size = Symbol("_size"); - _write = Symbol("_write"); - _writing = Symbol("_writing"); - _defaultFlag = Symbol("_defaultFlag"); - _errored = Symbol("_errored"); - ReadStream = class extends Minipass { - [_errored] = false; - [_fd]; - [_path]; - [_readSize]; - [_reading] = false; - [_size]; - [_remain]; - [_autoClose]; - constructor(path16, opt) { - opt = opt || {}; - super(opt); - this.readable = true; - this.writable = false; - if (typeof path16 !== "string") { - throw new TypeError("path must be a string"); - } - this[_errored] = false; - this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0; - this[_path] = path16; - this[_readSize] = opt.readSize || 16 * 1024 * 1024; - this[_reading] = false; - this[_size] = typeof opt.size === "number" ? opt.size : Infinity; - this[_remain] = this[_size]; - this[_autoClose] = typeof opt.autoClose === "boolean" ? opt.autoClose : true; - if (typeof this[_fd] === "number") { - this[_read](); - } else { - this[_open](); - } - } - get fd() { - return this[_fd]; - } - get path() { - return this[_path]; - } - //@ts-ignore - write() { - throw new TypeError("this is a readable stream"); - } - //@ts-ignore - end() { - throw new TypeError("this is a readable stream"); - } - [_open]() { - import_fs2.default.open(this[_path], "r", (er, fd) => this[_onopen](er, fd)); - } - [_onopen](er, fd) { - if (er) { - this[_onerror](er); - } else { - this[_fd] = fd; - this.emit("open", fd); - this[_read](); - } - } - [_makeBuf]() { - return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])); - } - [_read]() { - if (!this[_reading]) { - this[_reading] = true; - const buf = this[_makeBuf](); - if (buf.length === 0) { - return process.nextTick(() => this[_onread](null, 0, buf)); - } - import_fs2.default.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); - } - } - [_onread](er, br, buf) { - this[_reading] = false; - if (er) { - this[_onerror](er); - } else if (this[_handleChunk](br, buf)) { - this[_read](); - } - } - [_close]() { - if (this[_autoClose] && typeof this[_fd] === "number") { - const fd = this[_fd]; - this[_fd] = void 0; - import_fs2.default.close(fd, (er) => er ? this.emit("error", er) : this.emit("close")); - } - } - [_onerror](er) { - this[_reading] = true; - this[_close](); - this.emit("error", er); - } - [_handleChunk](br, buf) { - let ret = false; - this[_remain] -= br; - if (br > 0) { - ret = super.write(br < buf.length ? buf.subarray(0, br) : buf); - } - if (br === 0 || this[_remain] <= 0) { - ret = false; - this[_close](); - super.end(); - } - return ret; - } - emit(ev, ...args) { - switch (ev) { - case "prefinish": - case "finish": - return false; - case "drain": - if (typeof this[_fd] === "number") { - this[_read](); - } - return false; - case "error": - if (this[_errored]) { - return false; - } - this[_errored] = true; - return super.emit(ev, ...args); - default: - return super.emit(ev, ...args); - } - } - }; - ReadStreamSync = class extends ReadStream { - [_open]() { - let threw = true; - try { - this[_onopen](null, import_fs2.default.openSync(this[_path], "r")); - threw = false; - } finally { - if (threw) { - this[_close](); - } - } - } - [_read]() { - let threw = true; - try { - if (!this[_reading]) { - this[_reading] = true; - do { - const buf = this[_makeBuf](); - const br = buf.length === 0 ? 0 : import_fs2.default.readSync(this[_fd], buf, 0, buf.length, null); - if (!this[_handleChunk](br, buf)) { - break; - } - } while (true); - this[_reading] = false; - } - threw = false; - } finally { - if (threw) { - this[_close](); - } - } - } - [_close]() { - if (this[_autoClose] && typeof this[_fd] === "number") { - const fd = this[_fd]; - this[_fd] = void 0; - import_fs2.default.closeSync(fd); - this.emit("close"); - } - } - }; - WriteStream = class extends import_events2.default { - readable = false; - writable = true; - [_errored] = false; - [_writing] = false; - [_ended] = false; - [_queue] = []; - [_needDrain] = false; - [_path]; - [_mode]; - [_autoClose]; - [_fd]; - [_defaultFlag]; - [_flags]; - [_finished] = false; - [_pos]; - constructor(path16, opt) { - opt = opt || {}; - super(opt); - this[_path] = path16; - this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0; - this[_mode] = opt.mode === void 0 ? 438 : opt.mode; - this[_pos] = typeof opt.start === "number" ? opt.start : void 0; - this[_autoClose] = typeof opt.autoClose === "boolean" ? opt.autoClose : true; - const defaultFlag = this[_pos] !== void 0 ? "r+" : "w"; - this[_defaultFlag] = opt.flags === void 0; - this[_flags] = opt.flags === void 0 ? defaultFlag : opt.flags; - if (this[_fd] === void 0) { - this[_open](); - } - } - emit(ev, ...args) { - if (ev === "error") { - if (this[_errored]) { - return false; - } - this[_errored] = true; - } - return super.emit(ev, ...args); - } - get fd() { - return this[_fd]; - } - get path() { - return this[_path]; - } - [_onerror](er) { - this[_close](); - this[_writing] = true; - this.emit("error", er); - } - [_open]() { - import_fs2.default.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd)); - } - [_onopen](er, fd) { - if (this[_defaultFlag] && this[_flags] === "r+" && er && er.code === "ENOENT") { - this[_flags] = "w"; - this[_open](); - } else if (er) { - this[_onerror](er); - } else { - this[_fd] = fd; - this.emit("open", fd); - if (!this[_writing]) { - this[_flush](); - } - } - } - end(buf, enc) { - if (buf) { - this.write(buf, enc); - } - this[_ended] = true; - if (!this[_writing] && !this[_queue].length && typeof this[_fd] === "number") { - this[_onwrite](null, 0); - } - return this; - } - write(buf, enc) { - if (typeof buf === "string") { - buf = Buffer.from(buf, enc); - } - if (this[_ended]) { - this.emit("error", new Error("write() after end()")); - return false; - } - if (this[_fd] === void 0 || this[_writing] || this[_queue].length) { - this[_queue].push(buf); - this[_needDrain] = true; - return false; - } - this[_writing] = true; - this[_write](buf); - return true; - } - [_write](buf) { - import_fs2.default.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw)); - } - [_onwrite](er, bw) { - if (er) { - this[_onerror](er); - } else { - if (this[_pos] !== void 0 && typeof bw === "number") { - this[_pos] += bw; - } - if (this[_queue].length) { - this[_flush](); - } else { - this[_writing] = false; - if (this[_ended] && !this[_finished]) { - this[_finished] = true; - this[_close](); - this.emit("finish"); - } else if (this[_needDrain]) { - this[_needDrain] = false; - this.emit("drain"); - } - } - } - } - [_flush]() { - if (this[_queue].length === 0) { - if (this[_ended]) { - this[_onwrite](null, 0); - } - } else if (this[_queue].length === 1) { - this[_write](this[_queue].pop()); - } else { - const iovec = this[_queue]; - this[_queue] = []; - writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw)); - } - } - [_close]() { - if (this[_autoClose] && typeof this[_fd] === "number") { - const fd = this[_fd]; - this[_fd] = void 0; - import_fs2.default.close(fd, (er) => er ? this.emit("error", er) : this.emit("close")); - } - } - }; - WriteStreamSync = class extends WriteStream { - [_open]() { - let fd; - if (this[_defaultFlag] && this[_flags] === "r+") { - try { - fd = import_fs2.default.openSync(this[_path], this[_flags], this[_mode]); - } catch (er) { - if (er?.code === "ENOENT") { - this[_flags] = "w"; - return this[_open](); - } else { - throw er; - } - } - } else { - fd = import_fs2.default.openSync(this[_path], this[_flags], this[_mode]); - } - this[_onopen](null, fd); - } - [_close]() { - if (this[_autoClose] && typeof this[_fd] === "number") { - const fd = this[_fd]; - this[_fd] = void 0; - import_fs2.default.closeSync(fd); - this.emit("close"); - } - } - [_write](buf) { - let threw = true; - try { - this[_onwrite](null, import_fs2.default.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); - threw = false; - } finally { - if (threw) { - try { - this[_close](); - } catch { - } - } - } - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/options.js -var argmap, isSyncFile, isAsyncFile, isSyncNoFile, isAsyncNoFile, dealiasKey, dealias; -var init_options = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/options.js"() { - argmap = /* @__PURE__ */ new Map([ - ["C", "cwd"], - ["f", "file"], - ["z", "gzip"], - ["P", "preservePaths"], - ["U", "unlink"], - ["strip-components", "strip"], - ["stripComponents", "strip"], - ["keep-newer", "newer"], - ["keepNewer", "newer"], - ["keep-newer-files", "newer"], - ["keepNewerFiles", "newer"], - ["k", "keep"], - ["keep-existing", "keep"], - ["keepExisting", "keep"], - ["m", "noMtime"], - ["no-mtime", "noMtime"], - ["p", "preserveOwner"], - ["L", "follow"], - ["h", "follow"], - ["onentry", "onReadEntry"] - ]); - isSyncFile = (o) => !!o.sync && !!o.file; - isAsyncFile = (o) => !o.sync && !!o.file; - isSyncNoFile = (o) => !!o.sync && !o.file; - isAsyncNoFile = (o) => !o.sync && !o.file; - dealiasKey = (k) => { - const d = argmap.get(k); - if (d) - return d; - return k; - }; - dealias = (opt = {}) => { - if (!opt) - return {}; - const result = {}; - for (const [key, v] of Object.entries(opt)) { - const k = dealiasKey(key); - result[k] = v; - } - if (result.chmod === void 0 && result.noChmod === false) { - result.chmod = true; - } - delete result.noChmod; - return result; - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/make-command.js -var makeCommand; -var init_make_command = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/make-command.js"() { - init_options(); - makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { - return Object.assign((opt_ = [], entries, cb) => { - if (Array.isArray(opt_)) { - entries = opt_; - opt_ = {}; - } - if (typeof entries === "function") { - cb = entries; - entries = void 0; - } - if (!entries) { - entries = []; - } else { - entries = Array.from(entries); - } - const opt = dealias(opt_); - validate?.(opt, entries); - if (isSyncFile(opt)) { - if (typeof cb === "function") { - throw new TypeError("callback not supported for sync tar functions"); - } - return syncFile(opt, entries); - } else if (isAsyncFile(opt)) { - const p = asyncFile(opt, entries); - const c = cb ? cb : void 0; - return c ? p.then(() => c(), c) : p; - } else if (isSyncNoFile(opt)) { - if (typeof cb === "function") { - throw new TypeError("callback not supported for sync tar functions"); - } - return syncNoFile(opt, entries); - } else if (isAsyncNoFile(opt)) { - if (typeof cb === "function") { - throw new TypeError("callback only supported with file option"); - } - return asyncNoFile(opt, entries); - } else { - throw new Error("impossible options??"); - } - }, { - syncFile, - asyncFile, - syncNoFile, - asyncNoFile, - validate - }); - }; - } -}); - -// .yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/constants.js -var import_zlib, realZlibConstants, constants; -var init_constants = __esm({ - ".yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/constants.js"() { - import_zlib = __toESM(require("zlib"), 1); - realZlibConstants = import_zlib.default.constants || { ZLIB_VERNUM: 4736 }; - constants = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - Z_VERSION_ERROR: -6, - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - DEFLATE: 1, - INFLATE: 2, - GZIP: 3, - GUNZIP: 4, - DEFLATERAW: 5, - INFLATERAW: 6, - UNZIP: 7, - BROTLI_DECODE: 8, - BROTLI_ENCODE: 9, - Z_MIN_WINDOWBITS: 8, - Z_MAX_WINDOWBITS: 15, - Z_DEFAULT_WINDOWBITS: 15, - Z_MIN_CHUNK: 64, - Z_MAX_CHUNK: Infinity, - Z_DEFAULT_CHUNK: 16384, - Z_MIN_MEMLEVEL: 1, - Z_MAX_MEMLEVEL: 9, - Z_DEFAULT_MEMLEVEL: 8, - Z_MIN_LEVEL: -1, - Z_MAX_LEVEL: 9, - Z_DEFAULT_LEVEL: -1, - BROTLI_OPERATION_PROCESS: 0, - BROTLI_OPERATION_FLUSH: 1, - BROTLI_OPERATION_FINISH: 2, - BROTLI_OPERATION_EMIT_METADATA: 3, - BROTLI_MODE_GENERIC: 0, - BROTLI_MODE_TEXT: 1, - BROTLI_MODE_FONT: 2, - BROTLI_DEFAULT_MODE: 0, - BROTLI_MIN_QUALITY: 0, - BROTLI_MAX_QUALITY: 11, - BROTLI_DEFAULT_QUALITY: 11, - BROTLI_MIN_WINDOW_BITS: 10, - BROTLI_MAX_WINDOW_BITS: 24, - BROTLI_LARGE_MAX_WINDOW_BITS: 30, - BROTLI_DEFAULT_WINDOW: 22, - BROTLI_MIN_INPUT_BLOCK_BITS: 16, - BROTLI_MAX_INPUT_BLOCK_BITS: 24, - BROTLI_PARAM_MODE: 0, - BROTLI_PARAM_QUALITY: 1, - BROTLI_PARAM_LGWIN: 2, - BROTLI_PARAM_LGBLOCK: 3, - BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, - BROTLI_PARAM_SIZE_HINT: 5, - BROTLI_PARAM_LARGE_WINDOW: 6, - BROTLI_PARAM_NPOSTFIX: 7, - BROTLI_PARAM_NDIRECT: 8, - BROTLI_DECODER_RESULT_ERROR: 0, - BROTLI_DECODER_RESULT_SUCCESS: 1, - BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, - BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, - BROTLI_DECODER_NO_ERROR: 0, - BROTLI_DECODER_SUCCESS: 1, - BROTLI_DECODER_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, - BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, - BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, - BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, - BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, - BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, - BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, - BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, - BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, - BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, - BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, - BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, - BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, - BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, - BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, - BROTLI_DECODER_ERROR_UNREACHABLE: -31 - }, realZlibConstants)); - } -}); - -// .yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/index.js -var import_assert2, import_buffer, realZlib2, OriginalBufferConcat, desc, noop, passthroughBufferConcat, _superWrite, ZlibError, _flushFlag, ZlibBase, Zlib, Gzip, Unzip, Brotli, BrotliCompress, BrotliDecompress, Zstd, ZstdCompress, ZstdDecompress; -var init_esm3 = __esm({ - ".yarn/cache/minizlib-npm-3.1.0-6680befdba-5aad75ab00.zip/node_modules/minizlib/dist/esm/index.js"() { - import_assert2 = __toESM(require("assert"), 1); - import_buffer = require("buffer"); - init_esm(); - realZlib2 = __toESM(require("zlib"), 1); - init_constants(); - init_constants(); - OriginalBufferConcat = import_buffer.Buffer.concat; - desc = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat"); - noop = (args) => args; - passthroughBufferConcat = desc?.writable === true || desc?.set !== void 0 ? (makeNoOp) => { - import_buffer.Buffer.concat = makeNoOp ? noop : OriginalBufferConcat; - } : (_) => { - }; - _superWrite = Symbol("_superWrite"); - ZlibError = class extends Error { - code; - errno; - constructor(err, origin) { - super("zlib: " + err.message, { cause: err }); - this.code = err.code; - this.errno = err.errno; - if (!this.code) - this.code = "ZLIB_ERROR"; - this.message = "zlib: " + err.message; - Error.captureStackTrace(this, origin ?? this.constructor); - } - get name() { - return "ZlibError"; - } - }; - _flushFlag = Symbol("flushFlag"); - ZlibBase = class extends Minipass { - #sawError = false; - #ended = false; - #flushFlag; - #finishFlushFlag; - #fullFlushFlag; - #handle; - #onError; - get sawError() { - return this.#sawError; - } - get handle() { - return this.#handle; - } - /* c8 ignore start */ - get flushFlag() { - return this.#flushFlag; - } - /* c8 ignore stop */ - constructor(opts, mode) { - if (!opts || typeof opts !== "object") - throw new TypeError("invalid options for ZlibBase constructor"); - super(opts); - this.#flushFlag = opts.flush ?? 0; - this.#finishFlushFlag = opts.finishFlush ?? 0; - this.#fullFlushFlag = opts.fullFlushFlag ?? 0; - if (typeof realZlib2[mode] !== "function") { - throw new TypeError("Compression method not supported: " + mode); - } - try { - this.#handle = new realZlib2[mode](opts); - } catch (er) { - throw new ZlibError(er, this.constructor); - } - this.#onError = (err) => { - if (this.#sawError) - return; - this.#sawError = true; - this.close(); - this.emit("error", err); - }; - this.#handle?.on("error", (er) => this.#onError(new ZlibError(er))); - this.once("end", () => this.close); - } - close() { - if (this.#handle) { - this.#handle.close(); - this.#handle = void 0; - this.emit("close"); - } - } - reset() { - if (!this.#sawError) { - (0, import_assert2.default)(this.#handle, "zlib binding closed"); - return this.#handle.reset?.(); - } - } - flush(flushFlag) { - if (this.ended) - return; - if (typeof flushFlag !== "number") - flushFlag = this.#fullFlushFlag; - this.write(Object.assign(import_buffer.Buffer.alloc(0), { [_flushFlag]: flushFlag })); - } - end(chunk, encoding, cb) { - if (typeof chunk === "function") { - cb = chunk; - encoding = void 0; - chunk = void 0; - } - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (chunk) { - if (encoding) - this.write(chunk, encoding); - else - this.write(chunk); - } - this.flush(this.#finishFlushFlag); - this.#ended = true; - return super.end(cb); - } - get ended() { - return this.#ended; - } - // overridden in the gzip classes to do portable writes - [_superWrite](data) { - return super.write(data); - } - write(chunk, encoding, cb) { - if (typeof encoding === "function") - cb = encoding, encoding = "utf8"; - if (typeof chunk === "string") - chunk = import_buffer.Buffer.from(chunk, encoding); - if (this.#sawError) - return; - (0, import_assert2.default)(this.#handle, "zlib binding closed"); - const nativeHandle = this.#handle._handle; - const originalNativeClose = nativeHandle.close; - nativeHandle.close = () => { - }; - const originalClose = this.#handle.close; - this.#handle.close = () => { - }; - passthroughBufferConcat(true); - let result = void 0; - try { - const flushFlag = typeof chunk[_flushFlag] === "number" ? chunk[_flushFlag] : this.#flushFlag; - result = this.#handle._processChunk(chunk, flushFlag); - passthroughBufferConcat(false); - } catch (err) { - passthroughBufferConcat(false); - this.#onError(new ZlibError(err, this.write)); - } finally { - if (this.#handle) { - ; - this.#handle._handle = nativeHandle; - nativeHandle.close = originalNativeClose; - this.#handle.close = originalClose; - this.#handle.removeAllListeners("error"); - } - } - if (this.#handle) - this.#handle.on("error", (er) => this.#onError(new ZlibError(er, this.write))); - let writeReturn; - if (result) { - if (Array.isArray(result) && result.length > 0) { - const r = result[0]; - writeReturn = this[_superWrite](import_buffer.Buffer.from(r)); - for (let i = 1; i < result.length; i++) { - writeReturn = this[_superWrite](result[i]); - } - } else { - writeReturn = this[_superWrite](import_buffer.Buffer.from(result)); - } - } - if (cb) - cb(); - return writeReturn; - } - }; - Zlib = class extends ZlibBase { - #level; - #strategy; - constructor(opts, mode) { - opts = opts || {}; - opts.flush = opts.flush || constants.Z_NO_FLUSH; - opts.finishFlush = opts.finishFlush || constants.Z_FINISH; - opts.fullFlushFlag = constants.Z_FULL_FLUSH; - super(opts, mode); - this.#level = opts.level; - this.#strategy = opts.strategy; - } - params(level, strategy) { - if (this.sawError) - return; - if (!this.handle) - throw new Error("cannot switch params when binding is closed"); - if (!this.handle.params) - throw new Error("not supported in this implementation"); - if (this.#level !== level || this.#strategy !== strategy) { - this.flush(constants.Z_SYNC_FLUSH); - (0, import_assert2.default)(this.handle, "zlib binding closed"); - const origFlush = this.handle.flush; - this.handle.flush = (flushFlag, cb) => { - if (typeof flushFlag === "function") { - cb = flushFlag; - flushFlag = this.flushFlag; - } - this.flush(flushFlag); - cb?.(); - }; - try { - ; - this.handle.params(level, strategy); - } finally { - this.handle.flush = origFlush; - } - if (this.handle) { - this.#level = level; - this.#strategy = strategy; - } - } - } - }; - Gzip = class extends Zlib { - #portable; - constructor(opts) { - super(opts, "Gzip"); - this.#portable = opts && !!opts.portable; - } - [_superWrite](data) { - if (!this.#portable) - return super[_superWrite](data); - this.#portable = false; - data[9] = 255; - return super[_superWrite](data); - } - }; - Unzip = class extends Zlib { - constructor(opts) { - super(opts, "Unzip"); - } - }; - Brotli = class extends ZlibBase { - constructor(opts, mode) { - opts = opts || {}; - opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS; - opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH; - opts.fullFlushFlag = constants.BROTLI_OPERATION_FLUSH; - super(opts, mode); - } - }; - BrotliCompress = class extends Brotli { - constructor(opts) { - super(opts, "BrotliCompress"); - } - }; - BrotliDecompress = class extends Brotli { - constructor(opts) { - super(opts, "BrotliDecompress"); - } - }; - Zstd = class extends ZlibBase { - constructor(opts, mode) { - opts = opts || {}; - opts.flush = opts.flush || constants.ZSTD_e_continue; - opts.finishFlush = opts.finishFlush || constants.ZSTD_e_end; - opts.fullFlushFlag = constants.ZSTD_e_flush; - super(opts, mode); - } - }; - ZstdCompress = class extends Zstd { - constructor(opts) { - super(opts, "ZstdCompress"); - } - }; - ZstdDecompress = class extends Zstd { - constructor(opts) { - super(opts, "ZstdDecompress"); - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/large-numbers.js -var encode, encodePositive, encodeNegative, parse, twos, pos, onesComp, twosComp; -var init_large_numbers = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/large-numbers.js"() { - encode = (num, buf) => { - if (!Number.isSafeInteger(num)) { - throw Error("cannot encode number outside of javascript safe integer range"); - } else if (num < 0) { - encodeNegative(num, buf); - } else { - encodePositive(num, buf); - } - return buf; - }; - encodePositive = (num, buf) => { - buf[0] = 128; - for (var i = buf.length; i > 1; i--) { - buf[i - 1] = num & 255; - num = Math.floor(num / 256); - } - }; - encodeNegative = (num, buf) => { - buf[0] = 255; - var flipped = false; - num = num * -1; - for (var i = buf.length; i > 1; i--) { - var byte = num & 255; - num = Math.floor(num / 256); - if (flipped) { - buf[i - 1] = onesComp(byte); - } else if (byte === 0) { - buf[i - 1] = 0; - } else { - flipped = true; - buf[i - 1] = twosComp(byte); - } - } - }; - parse = (buf) => { - const pre = buf[0]; - const value = pre === 128 ? pos(buf.subarray(1, buf.length)) : pre === 255 ? twos(buf) : null; - if (value === null) { - throw Error("invalid base256 encoding"); - } - if (!Number.isSafeInteger(value)) { - throw Error("parsed number outside of javascript safe integer range"); - } - return value; - }; - twos = (buf) => { - var len = buf.length; - var sum = 0; - var flipped = false; - for (var i = len - 1; i > -1; i--) { - var byte = Number(buf[i]); - var f; - if (flipped) { - f = onesComp(byte); - } else if (byte === 0) { - f = byte; - } else { - flipped = true; - f = twosComp(byte); - } - if (f !== 0) { - sum -= f * Math.pow(256, len - i - 1); - } - } - return sum; - }; - pos = (buf) => { - var len = buf.length; - var sum = 0; - for (var i = len - 1; i > -1; i--) { - var byte = Number(buf[i]); - if (byte !== 0) { - sum += byte * Math.pow(256, len - i - 1); - } - } - return sum; - }; - onesComp = (byte) => (255 ^ byte) & 255; - twosComp = (byte) => (255 ^ byte) + 1 & 255; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/types.js -var isCode, name, code; -var init_types = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/types.js"() { - isCode = (c) => name.has(c); - name = /* @__PURE__ */ new Map([ - ["0", "File"], - // same as File - ["", "OldFile"], - ["1", "Link"], - ["2", "SymbolicLink"], - // Devices and FIFOs aren't fully supported - // they are parsed, but skipped when unpacking - ["3", "CharacterDevice"], - ["4", "BlockDevice"], - ["5", "Directory"], - ["6", "FIFO"], - // same as File - ["7", "ContiguousFile"], - // pax headers - ["g", "GlobalExtendedHeader"], - ["x", "ExtendedHeader"], - // vendor-specific stuff - // skip - ["A", "SolarisACL"], - // like 5, but with data, which should be skipped - ["D", "GNUDumpDir"], - // metadata only, skip - ["I", "Inode"], - // data = link path of next file - ["K", "NextFileHasLongLinkpath"], - // data = path of next file - ["L", "NextFileHasLongPath"], - // skip - ["M", "ContinuationFile"], - // like L - ["N", "OldGnuLongPath"], - // skip - ["S", "SparseFile"], - // skip - ["V", "TapeVolumeHeader"], - // like x - ["X", "OldExtendedHeader"] - ]); - code = new Map(Array.from(name).map((kv) => [kv[1], kv[0]])); - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/header.js -var import_node_path, Header, splitPrefix, decString, decDate, numToDate, decNumber, nanUndef, decSmallNumber, MAXNUM, encNumber, encSmallNumber, octalString, padOctal, encDate, NULLS, encString; -var init_header = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/header.js"() { - import_node_path = require("node:path"); - init_large_numbers(); - init_types(); - Header = class { - cksumValid = false; - needPax = false; - nullBlock = false; - block; - path; - mode; - uid; - gid; - size; - cksum; - #type = "Unsupported"; - linkpath; - uname; - gname; - devmaj = 0; - devmin = 0; - atime; - ctime; - mtime; - charset; - comment; - constructor(data, off = 0, ex, gex) { - if (Buffer.isBuffer(data)) { - this.decode(data, off || 0, ex, gex); - } else if (data) { - this.#slurp(data); - } - } - decode(buf, off, ex, gex) { - if (!off) { - off = 0; - } - if (!buf || !(buf.length >= off + 512)) { - throw new Error("need 512 bytes for header"); - } - this.path = ex?.path ?? decString(buf, off, 100); - this.mode = ex?.mode ?? gex?.mode ?? decNumber(buf, off + 100, 8); - this.uid = ex?.uid ?? gex?.uid ?? decNumber(buf, off + 108, 8); - this.gid = ex?.gid ?? gex?.gid ?? decNumber(buf, off + 116, 8); - this.size = ex?.size ?? gex?.size ?? decNumber(buf, off + 124, 12); - this.mtime = ex?.mtime ?? gex?.mtime ?? decDate(buf, off + 136, 12); - this.cksum = decNumber(buf, off + 148, 12); - if (gex) - this.#slurp(gex, true); - if (ex) - this.#slurp(ex); - const t = decString(buf, off + 156, 1); - if (isCode(t)) { - this.#type = t || "0"; - } - if (this.#type === "0" && this.path.slice(-1) === "/") { - this.#type = "5"; - } - if (this.#type === "5") { - this.size = 0; - } - this.linkpath = decString(buf, off + 157, 100); - if (buf.subarray(off + 257, off + 265).toString() === "ustar\x0000") { - this.uname = ex?.uname ?? gex?.uname ?? decString(buf, off + 265, 32); - this.gname = ex?.gname ?? gex?.gname ?? decString(buf, off + 297, 32); - this.devmaj = ex?.devmaj ?? gex?.devmaj ?? decNumber(buf, off + 329, 8) ?? 0; - this.devmin = ex?.devmin ?? gex?.devmin ?? decNumber(buf, off + 337, 8) ?? 0; - if (buf[off + 475] !== 0) { - const prefix = decString(buf, off + 345, 155); - this.path = prefix + "/" + this.path; - } else { - const prefix = decString(buf, off + 345, 130); - if (prefix) { - this.path = prefix + "/" + this.path; - } - this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12); - this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12); - } - } - let sum = 8 * 32; - for (let i = off; i < off + 148; i++) { - sum += buf[i]; - } - for (let i = off + 156; i < off + 512; i++) { - sum += buf[i]; - } - this.cksumValid = sum === this.cksum; - if (this.cksum === void 0 && sum === 8 * 32) { - this.nullBlock = true; - } - } - #slurp(ex, gex = false) { - Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { - return !(v === null || v === void 0 || k === "path" && gex || k === "linkpath" && gex || k === "global"); - }))); - } - encode(buf, off = 0) { - if (!buf) { - buf = this.block = Buffer.alloc(512); - } - if (this.#type === "Unsupported") { - this.#type = "0"; - } - if (!(buf.length >= off + 512)) { - throw new Error("need 512 bytes for header"); - } - const prefixSize = this.ctime || this.atime ? 130 : 155; - const split = splitPrefix(this.path || "", prefixSize); - const path16 = split[0]; - const prefix = split[1]; - this.needPax = !!split[2]; - this.needPax = encString(buf, off, 100, path16) || this.needPax; - this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax; - this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax; - this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax; - this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax; - this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax; - buf[off + 156] = this.#type.charCodeAt(0); - this.needPax = encString(buf, off + 157, 100, this.linkpath) || this.needPax; - buf.write("ustar\x0000", off + 257, 8); - this.needPax = encString(buf, off + 265, 32, this.uname) || this.needPax; - this.needPax = encString(buf, off + 297, 32, this.gname) || this.needPax; - this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; - this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax; - this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax; - if (buf[off + 475] !== 0) { - this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax; - } else { - this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax; - this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax; - this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax; - } - let sum = 8 * 32; - for (let i = off; i < off + 148; i++) { - sum += buf[i]; - } - for (let i = off + 156; i < off + 512; i++) { - sum += buf[i]; - } - this.cksum = sum; - encNumber(buf, off + 148, 8, this.cksum); - this.cksumValid = true; - return this.needPax; - } - get type() { - return this.#type === "Unsupported" ? this.#type : name.get(this.#type); - } - get typeKey() { - return this.#type; - } - set type(type) { - const c = String(code.get(type)); - if (isCode(c) || c === "Unsupported") { - this.#type = c; - } else if (isCode(type)) { - this.#type = type; - } else { - throw new TypeError("invalid entry type: " + type); - } - } - }; - splitPrefix = (p, prefixSize) => { - const pathSize = 100; - let pp = p; - let prefix = ""; - let ret = void 0; - const root = import_node_path.posix.parse(p).root || "."; - if (Buffer.byteLength(pp) < pathSize) { - ret = [pp, prefix, false]; - } else { - prefix = import_node_path.posix.dirname(pp); - pp = import_node_path.posix.basename(pp); - do { - if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize) { - ret = [pp, prefix, false]; - } else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) { - ret = [pp.slice(0, pathSize - 1), prefix, true]; - } else { - pp = import_node_path.posix.join(import_node_path.posix.basename(prefix), pp); - prefix = import_node_path.posix.dirname(prefix); - } - } while (prefix !== root && ret === void 0); - if (!ret) { - ret = [p.slice(0, pathSize - 1), "", true]; - } - } - return ret; - }; - decString = (buf, off, size) => buf.subarray(off, off + size).toString("utf8").replace(/\0.*/, ""); - decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); - numToDate = (num) => num === void 0 ? void 0 : new Date(num * 1e3); - decNumber = (buf, off, size) => Number(buf[off]) & 128 ? parse(buf.subarray(off, off + size)) : decSmallNumber(buf, off, size); - nanUndef = (value) => isNaN(value) ? void 0 : value; - decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf.subarray(off, off + size).toString("utf8").replace(/\0.*$/, "").trim(), 8)); - MAXNUM = { - 12: 8589934591, - 8: 2097151 - }; - encNumber = (buf, off, size, num) => num === void 0 ? false : num > MAXNUM[size] || num < 0 ? (encode(num, buf.subarray(off, off + size)), true) : (encSmallNumber(buf, off, size, num), false); - encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, "ascii"); - octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); - padOctal = (str, size) => (str.length === size - 1 ? str : new Array(size - str.length - 1).join("0") + str + " ") + "\0"; - encDate = (buf, off, size, date) => date === void 0 ? false : encNumber(buf, off, size, date.getTime() / 1e3); - NULLS = new Array(156).join("\0"); - encString = (buf, off, size, str) => str === void 0 ? false : (buf.write(str + NULLS, off, size, "utf8"), str.length !== Buffer.byteLength(str) || str.length > size); - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pax.js -var import_node_path2, Pax, merge, parseKV, parseKVLine; -var init_pax = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pax.js"() { - import_node_path2 = require("node:path"); - init_header(); - Pax = class _Pax { - atime; - mtime; - ctime; - charset; - comment; - gid; - uid; - gname; - uname; - linkpath; - dev; - ino; - nlink; - path; - size; - mode; - global; - constructor(obj, global2 = false) { - this.atime = obj.atime; - this.charset = obj.charset; - this.comment = obj.comment; - this.ctime = obj.ctime; - this.dev = obj.dev; - this.gid = obj.gid; - this.global = global2; - this.gname = obj.gname; - this.ino = obj.ino; - this.linkpath = obj.linkpath; - this.mtime = obj.mtime; - this.nlink = obj.nlink; - this.path = obj.path; - this.size = obj.size; - this.uid = obj.uid; - this.uname = obj.uname; - } - encode() { - const body = this.encodeBody(); - if (body === "") { - return Buffer.allocUnsafe(0); - } - const bodyLen = Buffer.byteLength(body); - const bufLen = 512 * Math.ceil(1 + bodyLen / 512); - const buf = Buffer.allocUnsafe(bufLen); - for (let i = 0; i < 512; i++) { - buf[i] = 0; - } - new Header({ - // XXX split the path - // then the path should be PaxHeader + basename, but less than 99, - // prepend with the dirname - /* c8 ignore start */ - path: ("PaxHeader/" + (0, import_node_path2.basename)(this.path ?? "")).slice(0, 99), - /* c8 ignore stop */ - mode: this.mode || 420, - uid: this.uid, - gid: this.gid, - size: bodyLen, - mtime: this.mtime, - type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", - linkpath: "", - uname: this.uname || "", - gname: this.gname || "", - devmaj: 0, - devmin: 0, - atime: this.atime, - ctime: this.ctime - }).encode(buf); - buf.write(body, 512, bodyLen, "utf8"); - for (let i = bodyLen + 512; i < buf.length; i++) { - buf[i] = 0; - } - return buf; - } - encodeBody() { - return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname"); - } - encodeField(field) { - if (this[field] === void 0) { - return ""; - } - const r = this[field]; - const v = r instanceof Date ? r.getTime() / 1e3 : r; - const s = " " + (field === "dev" || field === "ino" || field === "nlink" ? "SCHILY." : "") + field + "=" + v + "\n"; - const byteLen = Buffer.byteLength(s); - let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; - if (byteLen + digits >= Math.pow(10, digits)) { - digits += 1; - } - const len = digits + byteLen; - return len + s; - } - static parse(str, ex, g = false) { - return new _Pax(merge(parseKV(str), ex), g); - } - }; - merge = (a, b) => b ? Object.assign({}, b, a) : a; - parseKV = (str) => str.replace(/\n$/, "").split("\n").reduce(parseKVLine, /* @__PURE__ */ Object.create(null)); - parseKVLine = (set, line) => { - const n = parseInt(line, 10); - if (n !== Buffer.byteLength(line) + 1) { - return set; - } - line = line.slice((n + " ").length); - const kv = line.split("="); - const r = kv.shift(); - if (!r) { - return set; - } - const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"); - const v = kv.join("="); - set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? new Date(Number(v) * 1e3) : /^[0-9]+$/.test(v) ? +v : v; - return set; - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-windows-path.js -var platform, normalizeWindowsPath; -var init_normalize_windows_path = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-windows-path.js"() { - platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; - normalizeWindowsPath = platform !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/"); - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/read-entry.js -var ReadEntry; -var init_read_entry = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/read-entry.js"() { - init_esm(); - init_normalize_windows_path(); - ReadEntry = class extends Minipass { - extended; - globalExtended; - header; - startBlockSize; - blockRemain; - remain; - type; - meta = false; - ignore = false; - path; - mode; - uid; - gid; - uname; - gname; - size = 0; - mtime; - atime; - ctime; - linkpath; - dev; - ino; - nlink; - invalid = false; - absolute; - unsupported = false; - constructor(header, ex, gex) { - super({}); - this.pause(); - this.extended = ex; - this.globalExtended = gex; - this.header = header; - this.remain = header.size ?? 0; - this.startBlockSize = 512 * Math.ceil(this.remain / 512); - this.blockRemain = this.startBlockSize; - this.type = header.type; - switch (this.type) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - break; - case "NextFileHasLongLinkpath": - case "NextFileHasLongPath": - case "OldGnuLongPath": - case "GlobalExtendedHeader": - case "ExtendedHeader": - case "OldExtendedHeader": - this.meta = true; - break; - // NOTE: gnutar and bsdtar treat unrecognized types as 'File' - // it may be worth doing the same, but with a warning. - default: - this.ignore = true; - } - if (!header.path) { - throw new Error("no path provided for tar.ReadEntry"); - } - this.path = normalizeWindowsPath(header.path); - this.mode = header.mode; - if (this.mode) { - this.mode = this.mode & 4095; - } - this.uid = header.uid; - this.gid = header.gid; - this.uname = header.uname; - this.gname = header.gname; - this.size = this.remain; - this.mtime = header.mtime; - this.atime = header.atime; - this.ctime = header.ctime; - this.linkpath = header.linkpath ? normalizeWindowsPath(header.linkpath) : void 0; - this.uname = header.uname; - this.gname = header.gname; - if (ex) { - this.#slurp(ex); - } - if (gex) { - this.#slurp(gex, true); - } - } - write(data) { - const writeLen = data.length; - if (writeLen > this.blockRemain) { - throw new Error("writing more to entry than is appropriate"); - } - const r = this.remain; - const br = this.blockRemain; - this.remain = Math.max(0, r - writeLen); - this.blockRemain = Math.max(0, br - writeLen); - if (this.ignore) { - return true; - } - if (r >= writeLen) { - return super.write(data); - } - return super.write(data.subarray(0, r)); - } - #slurp(ex, gex = false) { - if (ex.path) - ex.path = normalizeWindowsPath(ex.path); - if (ex.linkpath) - ex.linkpath = normalizeWindowsPath(ex.linkpath); - Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { - return !(v === null || v === void 0 || k === "path" && gex); - }))); - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/warn-method.js -var warnMethod; -var init_warn_method = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/warn-method.js"() { - warnMethod = (self2, code2, message, data = {}) => { - if (self2.file) { - data.file = self2.file; - } - if (self2.cwd) { - data.cwd = self2.cwd; - } - data.code = message instanceof Error && message.code || code2; - data.tarCode = code2; - if (!self2.strict && data.recoverable !== false) { - if (message instanceof Error) { - data = Object.assign(message, data); - message = message.message; - } - self2.emit("warn", code2, message, data); - } else if (message instanceof Error) { - self2.emit("error", Object.assign(message, data)); - } else { - self2.emit("error", Object.assign(new Error(`${code2}: ${message}`), data)); - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/parse.js -var import_events3, maxMetaEntrySize, gzipHeader, zstdHeader, ZIP_HEADER_LEN, STATE, WRITEENTRY, READENTRY, NEXTENTRY, PROCESSENTRY, EX, GEX, META, EMITMETA, BUFFER2, QUEUE, ENDED, EMITTEDEND, EMIT, UNZIP, CONSUMECHUNK, CONSUMECHUNKSUB, CONSUMEBODY, CONSUMEMETA, CONSUMEHEADER, CONSUMING, BUFFERCONCAT, MAYBEEND, WRITING, ABORTED2, DONE, SAW_VALID_ENTRY, SAW_NULL_BLOCK, SAW_EOF, CLOSESTREAM, noop2, Parser; -var init_parse = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/parse.js"() { - import_events3 = require("events"); - init_esm3(); - init_header(); - init_pax(); - init_read_entry(); - init_warn_method(); - maxMetaEntrySize = 1024 * 1024; - gzipHeader = Buffer.from([31, 139]); - zstdHeader = Buffer.from([40, 181, 47, 253]); - ZIP_HEADER_LEN = Math.max(gzipHeader.length, zstdHeader.length); - STATE = Symbol("state"); - WRITEENTRY = Symbol("writeEntry"); - READENTRY = Symbol("readEntry"); - NEXTENTRY = Symbol("nextEntry"); - PROCESSENTRY = Symbol("processEntry"); - EX = Symbol("extendedHeader"); - GEX = Symbol("globalExtendedHeader"); - META = Symbol("meta"); - EMITMETA = Symbol("emitMeta"); - BUFFER2 = Symbol("buffer"); - QUEUE = Symbol("queue"); - ENDED = Symbol("ended"); - EMITTEDEND = Symbol("emittedEnd"); - EMIT = Symbol("emit"); - UNZIP = Symbol("unzip"); - CONSUMECHUNK = Symbol("consumeChunk"); - CONSUMECHUNKSUB = Symbol("consumeChunkSub"); - CONSUMEBODY = Symbol("consumeBody"); - CONSUMEMETA = Symbol("consumeMeta"); - CONSUMEHEADER = Symbol("consumeHeader"); - CONSUMING = Symbol("consuming"); - BUFFERCONCAT = Symbol("bufferConcat"); - MAYBEEND = Symbol("maybeEnd"); - WRITING = Symbol("writing"); - ABORTED2 = Symbol("aborted"); - DONE = Symbol("onDone"); - SAW_VALID_ENTRY = Symbol("sawValidEntry"); - SAW_NULL_BLOCK = Symbol("sawNullBlock"); - SAW_EOF = Symbol("sawEOF"); - CLOSESTREAM = Symbol("closeStream"); - noop2 = () => true; - Parser = class extends import_events3.EventEmitter { - file; - strict; - maxMetaEntrySize; - filter; - brotli; - zstd; - writable = true; - readable = false; - [QUEUE] = []; - [BUFFER2]; - [READENTRY]; - [WRITEENTRY]; - [STATE] = "begin"; - [META] = ""; - [EX]; - [GEX]; - [ENDED] = false; - [UNZIP]; - [ABORTED2] = false; - [SAW_VALID_ENTRY]; - [SAW_NULL_BLOCK] = false; - [SAW_EOF] = false; - [WRITING] = false; - [CONSUMING] = false; - [EMITTEDEND] = false; - constructor(opt = {}) { - super(); - this.file = opt.file || ""; - this.on(DONE, () => { - if (this[STATE] === "begin" || this[SAW_VALID_ENTRY] === false) { - this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format"); - } - }); - if (opt.ondone) { - this.on(DONE, opt.ondone); - } else { - this.on(DONE, () => { - this.emit("prefinish"); - this.emit("finish"); - this.emit("end"); - }); - } - this.strict = !!opt.strict; - this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; - this.filter = typeof opt.filter === "function" ? opt.filter : noop2; - const isTBR = opt.file && (opt.file.endsWith(".tar.br") || opt.file.endsWith(".tbr")); - this.brotli = !(opt.gzip || opt.zstd) && opt.brotli !== void 0 ? opt.brotli : isTBR ? void 0 : false; - const isTZST = opt.file && (opt.file.endsWith(".tar.zst") || opt.file.endsWith(".tzst")); - this.zstd = !(opt.gzip || opt.brotli) && opt.zstd !== void 0 ? opt.zstd : isTZST ? true : void 0; - this.on("end", () => this[CLOSESTREAM]()); - if (typeof opt.onwarn === "function") { - this.on("warn", opt.onwarn); - } - if (typeof opt.onReadEntry === "function") { - this.on("entry", opt.onReadEntry); - } - } - warn(code2, message, data = {}) { - warnMethod(this, code2, message, data); - } - [CONSUMEHEADER](chunk, position) { - if (this[SAW_VALID_ENTRY] === void 0) { - this[SAW_VALID_ENTRY] = false; - } - let header; - try { - header = new Header(chunk, position, this[EX], this[GEX]); - } catch (er) { - return this.warn("TAR_ENTRY_INVALID", er); - } - if (header.nullBlock) { - if (this[SAW_NULL_BLOCK]) { - this[SAW_EOF] = true; - if (this[STATE] === "begin") { - this[STATE] = "header"; - } - this[EMIT]("eof"); - } else { - this[SAW_NULL_BLOCK] = true; - this[EMIT]("nullBlock"); - } - } else { - this[SAW_NULL_BLOCK] = false; - if (!header.cksumValid) { - this.warn("TAR_ENTRY_INVALID", "checksum failure", { header }); - } else if (!header.path) { - this.warn("TAR_ENTRY_INVALID", "path is required", { header }); - } else { - const type = header.type; - if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { - this.warn("TAR_ENTRY_INVALID", "linkpath required", { - header - }); - } else if (!/^(Symbolic)?Link$/.test(type) && !/^(Global)?ExtendedHeader$/.test(type) && header.linkpath) { - this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { - header - }); - } else { - const entry = this[WRITEENTRY] = new ReadEntry(header, this[EX], this[GEX]); - if (!this[SAW_VALID_ENTRY]) { - if (entry.remain) { - const onend = () => { - if (!entry.invalid) { - this[SAW_VALID_ENTRY] = true; - } - }; - entry.on("end", onend); - } else { - this[SAW_VALID_ENTRY] = true; - } - } - if (entry.meta) { - if (entry.size > this.maxMetaEntrySize) { - entry.ignore = true; - this[EMIT]("ignoredEntry", entry); - this[STATE] = "ignore"; - entry.resume(); - } else if (entry.size > 0) { - this[META] = ""; - entry.on("data", (c) => this[META] += c); - this[STATE] = "meta"; - } - } else { - this[EX] = void 0; - entry.ignore = entry.ignore || !this.filter(entry.path, entry); - if (entry.ignore) { - this[EMIT]("ignoredEntry", entry); - this[STATE] = entry.remain ? "ignore" : "header"; - entry.resume(); - } else { - if (entry.remain) { - this[STATE] = "body"; - } else { - this[STATE] = "header"; - entry.end(); - } - if (!this[READENTRY]) { - this[QUEUE].push(entry); - this[NEXTENTRY](); - } else { - this[QUEUE].push(entry); - } - } - } - } - } - } - } - [CLOSESTREAM]() { - queueMicrotask(() => this.emit("close")); - } - [PROCESSENTRY](entry) { - let go = true; - if (!entry) { - this[READENTRY] = void 0; - go = false; - } else if (Array.isArray(entry)) { - const [ev, ...args] = entry; - this.emit(ev, ...args); - } else { - this[READENTRY] = entry; - this.emit("entry", entry); - if (!entry.emittedEnd) { - entry.on("end", () => this[NEXTENTRY]()); - go = false; - } - } - return go; - } - [NEXTENTRY]() { - do { - } while (this[PROCESSENTRY](this[QUEUE].shift())); - if (!this[QUEUE].length) { - const re = this[READENTRY]; - const drainNow = !re || re.flowing || re.size === re.remain; - if (drainNow) { - if (!this[WRITING]) { - this.emit("drain"); - } - } else { - re.once("drain", () => this.emit("drain")); - } - } - } - [CONSUMEBODY](chunk, position) { - const entry = this[WRITEENTRY]; - if (!entry) { - throw new Error("attempt to consume body without entry??"); - } - const br = entry.blockRemain ?? 0; - const c = br >= chunk.length && position === 0 ? chunk : chunk.subarray(position, position + br); - entry.write(c); - if (!entry.blockRemain) { - this[STATE] = "header"; - this[WRITEENTRY] = void 0; - entry.end(); - } - return c.length; - } - [CONSUMEMETA](chunk, position) { - const entry = this[WRITEENTRY]; - const ret = this[CONSUMEBODY](chunk, position); - if (!this[WRITEENTRY] && entry) { - this[EMITMETA](entry); - } - return ret; - } - [EMIT](ev, data, extra) { - if (!this[QUEUE].length && !this[READENTRY]) { - this.emit(ev, data, extra); - } else { - this[QUEUE].push([ev, data, extra]); - } - } - [EMITMETA](entry) { - this[EMIT]("meta", this[META]); - switch (entry.type) { - case "ExtendedHeader": - case "OldExtendedHeader": - this[EX] = Pax.parse(this[META], this[EX], false); - break; - case "GlobalExtendedHeader": - this[GEX] = Pax.parse(this[META], this[GEX], true); - break; - case "NextFileHasLongPath": - case "OldGnuLongPath": { - const ex = this[EX] ?? /* @__PURE__ */ Object.create(null); - this[EX] = ex; - ex.path = this[META].replace(/\0.*/, ""); - break; - } - case "NextFileHasLongLinkpath": { - const ex = this[EX] || /* @__PURE__ */ Object.create(null); - this[EX] = ex; - ex.linkpath = this[META].replace(/\0.*/, ""); - break; - } - /* c8 ignore start */ - default: - throw new Error("unknown meta: " + entry.type); - } - } - abort(error) { - this[ABORTED2] = true; - this.emit("abort", error); - this.warn("TAR_ABORT", error, { recoverable: false }); - } - write(chunk, encoding, cb) { - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (typeof chunk === "string") { - chunk = Buffer.from( - chunk, - /* c8 ignore next */ - typeof encoding === "string" ? encoding : "utf8" - ); - } - if (this[ABORTED2]) { - cb?.(); - return false; - } - const needSniff = this[UNZIP] === void 0 || this.brotli === void 0 && this[UNZIP] === false; - if (needSniff && chunk) { - if (this[BUFFER2]) { - chunk = Buffer.concat([this[BUFFER2], chunk]); - this[BUFFER2] = void 0; - } - if (chunk.length < ZIP_HEADER_LEN) { - this[BUFFER2] = chunk; - cb?.(); - return true; - } - for (let i = 0; this[UNZIP] === void 0 && i < gzipHeader.length; i++) { - if (chunk[i] !== gzipHeader[i]) { - this[UNZIP] = false; - } - } - let isZstd = false; - if (this[UNZIP] === false && this.zstd !== false) { - isZstd = true; - for (let i = 0; i < zstdHeader.length; i++) { - if (chunk[i] !== zstdHeader[i]) { - isZstd = false; - break; - } - } - } - const maybeBrotli = this.brotli === void 0 && !isZstd; - if (this[UNZIP] === false && maybeBrotli) { - if (chunk.length < 512) { - if (this[ENDED]) { - this.brotli = true; - } else { - this[BUFFER2] = chunk; - cb?.(); - return true; - } - } else { - try { - new Header(chunk.subarray(0, 512)); - this.brotli = false; - } catch (_) { - this.brotli = true; - } - } - } - if (this[UNZIP] === void 0 || this[UNZIP] === false && (this.brotli || isZstd)) { - const ended = this[ENDED]; - this[ENDED] = false; - this[UNZIP] = this[UNZIP] === void 0 ? new Unzip({}) : isZstd ? new ZstdDecompress({}) : new BrotliDecompress({}); - this[UNZIP].on("data", (chunk2) => this[CONSUMECHUNK](chunk2)); - this[UNZIP].on("error", (er) => this.abort(er)); - this[UNZIP].on("end", () => { - this[ENDED] = true; - this[CONSUMECHUNK](); - }); - this[WRITING] = true; - const ret2 = !!this[UNZIP][ended ? "end" : "write"](chunk); - this[WRITING] = false; - cb?.(); - return ret2; - } - } - this[WRITING] = true; - if (this[UNZIP]) { - this[UNZIP].write(chunk); - } else { - this[CONSUMECHUNK](chunk); - } - this[WRITING] = false; - const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true; - if (!ret && !this[QUEUE].length) { - this[READENTRY]?.once("drain", () => this.emit("drain")); - } - cb?.(); - return ret; - } - [BUFFERCONCAT](c) { - if (c && !this[ABORTED2]) { - this[BUFFER2] = this[BUFFER2] ? Buffer.concat([this[BUFFER2], c]) : c; - } - } - [MAYBEEND]() { - if (this[ENDED] && !this[EMITTEDEND] && !this[ABORTED2] && !this[CONSUMING]) { - this[EMITTEDEND] = true; - const entry = this[WRITEENTRY]; - if (entry && entry.blockRemain) { - const have = this[BUFFER2] ? this[BUFFER2].length : 0; - this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); - if (this[BUFFER2]) { - entry.write(this[BUFFER2]); - } - entry.end(); - } - this[EMIT](DONE); - } - } - [CONSUMECHUNK](chunk) { - if (this[CONSUMING] && chunk) { - this[BUFFERCONCAT](chunk); - } else if (!chunk && !this[BUFFER2]) { - this[MAYBEEND](); - } else if (chunk) { - this[CONSUMING] = true; - if (this[BUFFER2]) { - this[BUFFERCONCAT](chunk); - const c = this[BUFFER2]; - this[BUFFER2] = void 0; - this[CONSUMECHUNKSUB](c); - } else { - this[CONSUMECHUNKSUB](chunk); - } - while (this[BUFFER2] && this[BUFFER2]?.length >= 512 && !this[ABORTED2] && !this[SAW_EOF]) { - const c = this[BUFFER2]; - this[BUFFER2] = void 0; - this[CONSUMECHUNKSUB](c); - } - this[CONSUMING] = false; - } - if (!this[BUFFER2] || this[ENDED]) { - this[MAYBEEND](); - } - } - [CONSUMECHUNKSUB](chunk) { - let position = 0; - const length = chunk.length; - while (position + 512 <= length && !this[ABORTED2] && !this[SAW_EOF]) { - switch (this[STATE]) { - case "begin": - case "header": - this[CONSUMEHEADER](chunk, position); - position += 512; - break; - case "ignore": - case "body": - position += this[CONSUMEBODY](chunk, position); - break; - case "meta": - position += this[CONSUMEMETA](chunk, position); - break; - /* c8 ignore start */ - default: - throw new Error("invalid state: " + this[STATE]); - } - } - if (position < length) { - if (this[BUFFER2]) { - this[BUFFER2] = Buffer.concat([ - chunk.subarray(position), - this[BUFFER2] - ]); - } else { - this[BUFFER2] = chunk.subarray(position); - } - } - } - end(chunk, encoding, cb) { - if (typeof chunk === "function") { - cb = chunk; - encoding = void 0; - chunk = void 0; - } - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - if (cb) - this.once("finish", cb); - if (!this[ABORTED2]) { - if (this[UNZIP]) { - if (chunk) - this[UNZIP].write(chunk); - this[UNZIP].end(); - } else { - this[ENDED] = true; - if (this.brotli === void 0 || this.zstd === void 0) - chunk = chunk || Buffer.alloc(0); - if (chunk) - this.write(chunk); - this[MAYBEEND](); - } - } - return this; - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-trailing-slashes.js -var stripTrailingSlashes; -var init_strip_trailing_slashes = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-trailing-slashes.js"() { - stripTrailingSlashes = (str) => { - let i = str.length - 1; - let slashesStart = -1; - while (i > -1 && str.charAt(i) === "/") { - slashesStart = i; - i--; - } - return slashesStart === -1 ? str : str.slice(0, slashesStart); - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/list.js -var list_exports = {}; -__export(list_exports, { - filesFilter: () => filesFilter, - list: () => list -}); -var import_node_fs, import_path2, onReadEntryFunction, filesFilter, listFileSync, listFile, list; -var init_list = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/list.js"() { - init_esm2(); - import_node_fs = __toESM(require("node:fs"), 1); - import_path2 = require("path"); - init_make_command(); - init_parse(); - init_strip_trailing_slashes(); - onReadEntryFunction = (opt) => { - const onReadEntry = opt.onReadEntry; - opt.onReadEntry = onReadEntry ? (e) => { - onReadEntry(e); - e.resume(); - } : (e) => e.resume(); - }; - filesFilter = (opt, files) => { - const map = new Map(files.map((f) => [stripTrailingSlashes(f), true])); - const filter = opt.filter; - const mapHas = (file, r = "") => { - const root = r || (0, import_path2.parse)(file).root || "."; - let ret; - if (file === root) - ret = false; - else { - const m = map.get(file); - if (m !== void 0) { - ret = m; - } else { - ret = mapHas((0, import_path2.dirname)(file), root); - } - } - map.set(file, ret); - return ret; - }; - opt.filter = filter ? (file, entry) => filter(file, entry) && mapHas(stripTrailingSlashes(file)) : (file) => mapHas(stripTrailingSlashes(file)); - }; - listFileSync = (opt) => { - const p = new Parser(opt); - const file = opt.file; - let fd; - try { - fd = import_node_fs.default.openSync(file, "r"); - const stat = import_node_fs.default.fstatSync(fd); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - if (stat.size < readSize) { - const buf = Buffer.allocUnsafe(stat.size); - const read = import_node_fs.default.readSync(fd, buf, 0, stat.size, 0); - p.end(read === buf.byteLength ? buf : buf.subarray(0, read)); - } else { - let pos2 = 0; - const buf = Buffer.allocUnsafe(readSize); - while (pos2 < stat.size) { - const bytesRead = import_node_fs.default.readSync(fd, buf, 0, readSize, pos2); - if (bytesRead === 0) - break; - pos2 += bytesRead; - p.write(buf.subarray(0, bytesRead)); - } - p.end(); - } - } finally { - if (typeof fd === "number") { - try { - import_node_fs.default.closeSync(fd); - } catch (er) { - } - } - } - }; - listFile = (opt, _files) => { - const parse4 = new Parser(opt); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - const file = opt.file; - const p = new Promise((resolve, reject) => { - parse4.on("error", reject); - parse4.on("end", resolve); - import_node_fs.default.stat(file, (er, stat) => { - if (er) { - reject(er); - } else { - const stream = new ReadStream(file, { - readSize, - size: stat.size - }); - stream.on("error", reject); - stream.pipe(parse4); - } - }); - }); - return p; - }; - list = makeCommand(listFileSync, listFile, (opt) => new Parser(opt), (opt) => new Parser(opt), (opt, files) => { - if (files?.length) - filesFilter(opt, files); - if (!opt.noResume) - onReadEntryFunction(opt); - }); - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/get-write-flag.js -var import_fs3, platform2, isWindows, O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP, fMapEnabled, fMapLimit, fMapFlag, getWriteFlag; -var init_get_write_flag = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/get-write-flag.js"() { - import_fs3 = __toESM(require("fs"), 1); - platform2 = process.env.__FAKE_PLATFORM__ || process.platform; - isWindows = platform2 === "win32"; - ({ O_CREAT, O_TRUNC, O_WRONLY } = import_fs3.default.constants); - UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs3.default.constants.UV_FS_O_FILEMAP || 0; - fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; - fMapLimit = 512 * 1024; - fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; - getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMapFlag : "w"; - } -}); - -// .yarn/cache/chownr-npm-3.0.0-5275e85d25-43925b8770.zip/node_modules/chownr/dist/esm/index.js -var import_node_fs2, import_node_path3, lchownSync, chown, chownrKid, chownr, chownrKidSync, chownrSync; -var init_esm4 = __esm({ - ".yarn/cache/chownr-npm-3.0.0-5275e85d25-43925b8770.zip/node_modules/chownr/dist/esm/index.js"() { - import_node_fs2 = __toESM(require("node:fs"), 1); - import_node_path3 = __toESM(require("node:path"), 1); - lchownSync = (path16, uid, gid) => { - try { - return import_node_fs2.default.lchownSync(path16, uid, gid); - } catch (er) { - if (er?.code !== "ENOENT") - throw er; - } - }; - chown = (cpath, uid, gid, cb) => { - import_node_fs2.default.lchown(cpath, uid, gid, (er) => { - cb(er && er?.code !== "ENOENT" ? er : null); - }); - }; - chownrKid = (p, child, uid, gid, cb) => { - if (child.isDirectory()) { - chownr(import_node_path3.default.resolve(p, child.name), uid, gid, (er) => { - if (er) - return cb(er); - const cpath = import_node_path3.default.resolve(p, child.name); - chown(cpath, uid, gid, cb); - }); - } else { - const cpath = import_node_path3.default.resolve(p, child.name); - chown(cpath, uid, gid, cb); - } - }; - chownr = (p, uid, gid, cb) => { - import_node_fs2.default.readdir(p, { withFileTypes: true }, (er, children) => { - if (er) { - if (er.code === "ENOENT") - return cb(); - else if (er.code !== "ENOTDIR" && er.code !== "ENOTSUP") - return cb(er); - } - if (er || !children.length) - return chown(p, uid, gid, cb); - let len = children.length; - let errState = null; - const then = (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--len === 0) - return chown(p, uid, gid, cb); - }; - for (const child of children) { - chownrKid(p, child, uid, gid, then); - } - }); - }; - chownrKidSync = (p, child, uid, gid) => { - if (child.isDirectory()) - chownrSync(import_node_path3.default.resolve(p, child.name), uid, gid); - lchownSync(import_node_path3.default.resolve(p, child.name), uid, gid); - }; - chownrSync = (p, uid, gid) => { - let children; - try { - children = import_node_fs2.default.readdirSync(p, { withFileTypes: true }); - } catch (er) { - const e = er; - if (e?.code === "ENOENT") - return; - else if (e?.code === "ENOTDIR" || e?.code === "ENOTSUP") - return lchownSync(p, uid, gid); - else - throw e; - } - for (const child of children) { - chownrKidSync(p, child, uid, gid); - } - return lchownSync(p, uid, gid); - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/cwd-error.js -var CwdError; -var init_cwd_error = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/cwd-error.js"() { - CwdError = class extends Error { - path; - code; - syscall = "chdir"; - constructor(path16, code2) { - super(`${code2}: Cannot cd into '${path16}'`); - this.path = path16; - this.code = code2; - } - get name() { - return "CwdError"; - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/symlink-error.js -var SymlinkError; -var init_symlink_error = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/symlink-error.js"() { - SymlinkError = class extends Error { - path; - symlink; - syscall = "symlink"; - code = "TAR_SYMLINK_ERROR"; - constructor(symlink, path16) { - super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"); - this.symlink = symlink; - this.path = path16; - } - get name() { - return "SymlinkError"; - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mkdir.js -var import_node_fs3, import_promises, import_node_path4, checkCwd, mkdir, mkdir_, onmkdir, checkCwdSync, mkdirSync2; -var init_mkdir = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mkdir.js"() { - init_esm4(); - import_node_fs3 = __toESM(require("node:fs"), 1); - import_promises = __toESM(require("node:fs/promises"), 1); - import_node_path4 = __toESM(require("node:path"), 1); - init_cwd_error(); - init_normalize_windows_path(); - init_symlink_error(); - checkCwd = (dir, cb) => { - import_node_fs3.default.stat(dir, (er, st) => { - if (er || !st.isDirectory()) { - er = new CwdError(dir, er?.code || "ENOTDIR"); - } - cb(er); - }); - }; - mkdir = (dir, opt, cb) => { - dir = normalizeWindowsPath(dir); - const umask = opt.umask ?? 18; - const mode = opt.mode | 448; - const needChmod = (mode & umask) !== 0; - const uid = opt.uid; - const gid = opt.gid; - const doChown = typeof uid === "number" && typeof gid === "number" && (uid !== opt.processUid || gid !== opt.processGid); - const preserve = opt.preserve; - const unlink = opt.unlink; - const cwd = normalizeWindowsPath(opt.cwd); - const done = (er, created) => { - if (er) { - cb(er); - } else { - if (created && doChown) { - chownr(created, uid, gid, (er2) => done(er2)); - } else if (needChmod) { - import_node_fs3.default.chmod(dir, mode, cb); - } else { - cb(); - } - } - }; - if (dir === cwd) { - return checkCwd(dir, done); - } - if (preserve) { - return import_promises.default.mkdir(dir, { mode, recursive: true }).then( - (made) => done(null, made ?? void 0), - // oh, ts - done - ); - } - const sub = normalizeWindowsPath(import_node_path4.default.relative(cwd, dir)); - const parts = sub.split("/"); - mkdir_(cwd, parts, mode, unlink, cwd, void 0, done); - }; - mkdir_ = (base, parts, mode, unlink, cwd, created, cb) => { - if (!parts.length) { - return cb(null, created); - } - const p = parts.shift(); - const part = normalizeWindowsPath(import_node_path4.default.resolve(base + "/" + p)); - import_node_fs3.default.mkdir(part, mode, onmkdir(part, parts, mode, unlink, cwd, created, cb)); - }; - onmkdir = (part, parts, mode, unlink, cwd, created, cb) => (er) => { - if (er) { - import_node_fs3.default.lstat(part, (statEr, st) => { - if (statEr) { - statEr.path = statEr.path && normalizeWindowsPath(statEr.path); - cb(statEr); - } else if (st.isDirectory()) { - mkdir_(part, parts, mode, unlink, cwd, created, cb); - } else if (unlink) { - import_node_fs3.default.unlink(part, (er2) => { - if (er2) { - return cb(er2); - } - import_node_fs3.default.mkdir(part, mode, onmkdir(part, parts, mode, unlink, cwd, created, cb)); - }); - } else if (st.isSymbolicLink()) { - return cb(new SymlinkError(part, part + "/" + parts.join("/"))); - } else { - cb(er); - } - }); - } else { - created = created || part; - mkdir_(part, parts, mode, unlink, cwd, created, cb); - } - }; - checkCwdSync = (dir) => { - let ok = false; - let code2 = void 0; - try { - ok = import_node_fs3.default.statSync(dir).isDirectory(); - } catch (er) { - code2 = er?.code; - } finally { - if (!ok) { - throw new CwdError(dir, code2 ?? "ENOTDIR"); - } - } - }; - mkdirSync2 = (dir, opt) => { - dir = normalizeWindowsPath(dir); - const umask = opt.umask ?? 18; - const mode = opt.mode | 448; - const needChmod = (mode & umask) !== 0; - const uid = opt.uid; - const gid = opt.gid; - const doChown = typeof uid === "number" && typeof gid === "number" && (uid !== opt.processUid || gid !== opt.processGid); - const preserve = opt.preserve; - const unlink = opt.unlink; - const cwd = normalizeWindowsPath(opt.cwd); - const done = (created2) => { - if (created2 && doChown) { - chownrSync(created2, uid, gid); - } - if (needChmod) { - import_node_fs3.default.chmodSync(dir, mode); - } - }; - if (dir === cwd) { - checkCwdSync(cwd); - return done(); - } - if (preserve) { - return done(import_node_fs3.default.mkdirSync(dir, { mode, recursive: true }) ?? void 0); - } - const sub = normalizeWindowsPath(import_node_path4.default.relative(cwd, dir)); - const parts = sub.split("/"); - let created = void 0; - for (let p = parts.shift(), part = cwd; p && (part += "/" + p); p = parts.shift()) { - part = normalizeWindowsPath(import_node_path4.default.resolve(part)); - try { - import_node_fs3.default.mkdirSync(part, mode); - created = created || part; - } catch (er) { - const st = import_node_fs3.default.lstatSync(part); - if (st.isDirectory()) { - continue; - } else if (unlink) { - import_node_fs3.default.unlinkSync(part); - import_node_fs3.default.mkdirSync(part, mode); - created = created || part; - continue; - } else if (st.isSymbolicLink()) { - return new SymlinkError(part, part + "/" + parts.join("/")); - } - } - } - return done(created); - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-absolute-path.js -var import_node_path5, isAbsolute, parse3, stripAbsolutePath; -var init_strip_absolute_path = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/strip-absolute-path.js"() { - import_node_path5 = require("node:path"); - ({ isAbsolute, parse: parse3 } = import_node_path5.win32); - stripAbsolutePath = (path16) => { - let r = ""; - let parsed = parse3(path16); - while (isAbsolute(path16) || parsed.root) { - const root = path16.charAt(0) === "/" && path16.slice(0, 4) !== "//?/" ? "/" : parsed.root; - path16 = path16.slice(root.length); - r += root; - parsed = parse3(path16); - } - return [r, path16]; - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/winchars.js -var raw, win, toWin, toRaw, encode2, decode; -var init_winchars = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/winchars.js"() { - raw = ["|", "<", ">", "?", ":"]; - win = raw.map((char) => String.fromCharCode(61440 + char.charCodeAt(0))); - toWin = new Map(raw.map((char, i) => [char, win[i]])); - toRaw = new Map(win.map((char, i) => [char, raw[i]])); - encode2 = (s) => raw.reduce((s2, c) => s2.split(c).join(toWin.get(c)), s); - decode = (s) => win.reduce((s2, c) => s2.split(c).join(toRaw.get(c)), s); - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-unicode.js -var normalizeCache, MAX, cache, normalizeUnicode; -var init_normalize_unicode = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/normalize-unicode.js"() { - normalizeCache = /* @__PURE__ */ Object.create(null); - MAX = 1e4; - cache = /* @__PURE__ */ new Set(); - normalizeUnicode = (s) => { - if (!cache.has(s)) { - normalizeCache[s] = s.normalize("NFD"); - } else { - cache.delete(s); - } - cache.add(s); - const ret = normalizeCache[s]; - let i = cache.size - MAX; - if (i > MAX / 10) { - for (const s2 of cache) { - cache.delete(s2); - delete normalizeCache[s2]; - if (--i <= 0) - break; - } - } - return ret; - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/path-reservations.js -var import_node_path6, platform3, isWindows2, getDirs, PathReservations; -var init_path_reservations = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/path-reservations.js"() { - import_node_path6 = require("node:path"); - init_normalize_unicode(); - init_strip_trailing_slashes(); - platform3 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; - isWindows2 = platform3 === "win32"; - getDirs = (path16) => { - const dirs = path16.split("/").slice(0, -1).reduce((set, path17) => { - const s = set[set.length - 1]; - if (s !== void 0) { - path17 = (0, import_node_path6.join)(s, path17); - } - set.push(path17 || "/"); - return set; - }, []); - return dirs; - }; - PathReservations = class { - // path => [function or Set] - // A Set object means a directory reservation - // A fn is a direct reservation on that path - #queues = /* @__PURE__ */ new Map(); - // fn => {paths:[path,...], dirs:[path, ...]} - #reservations = /* @__PURE__ */ new Map(); - // functions currently running - #running = /* @__PURE__ */ new Set(); - reserve(paths, fn2) { - paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p) => { - return stripTrailingSlashes((0, import_node_path6.join)(normalizeUnicode(p))).toLowerCase(); - }); - const dirs = new Set(paths.map((path16) => getDirs(path16)).reduce((a, b) => a.concat(b))); - this.#reservations.set(fn2, { dirs, paths }); - for (const p of paths) { - const q = this.#queues.get(p); - if (!q) { - this.#queues.set(p, [fn2]); - } else { - q.push(fn2); - } - } - for (const dir of dirs) { - const q = this.#queues.get(dir); - if (!q) { - this.#queues.set(dir, [/* @__PURE__ */ new Set([fn2])]); - } else { - const l = q[q.length - 1]; - if (l instanceof Set) { - l.add(fn2); - } else { - q.push(/* @__PURE__ */ new Set([fn2])); - } - } - } - return this.#run(fn2); - } - // return the queues for each path the function cares about - // fn => {paths, dirs} - #getQueues(fn2) { - const res = this.#reservations.get(fn2); - if (!res) { - throw new Error("function does not have any path reservations"); - } - return { - paths: res.paths.map((path16) => this.#queues.get(path16)), - dirs: [...res.dirs].map((path16) => this.#queues.get(path16)) - }; - } - // check if fn is first in line for all its paths, and is - // included in the first set for all its dir queues - check(fn2) { - const { paths, dirs } = this.#getQueues(fn2); - return paths.every((q) => q && q[0] === fn2) && dirs.every((q) => q && q[0] instanceof Set && q[0].has(fn2)); - } - // run the function if it's first in line and not already running - #run(fn2) { - if (this.#running.has(fn2) || !this.check(fn2)) { - return false; - } - this.#running.add(fn2); - fn2(() => this.#clear(fn2)); - return true; - } - #clear(fn2) { - if (!this.#running.has(fn2)) { - return false; - } - const res = this.#reservations.get(fn2); - if (!res) { - throw new Error("invalid reservation"); - } - const { paths, dirs } = res; - const next = /* @__PURE__ */ new Set(); - for (const path16 of paths) { - const q = this.#queues.get(path16); - if (!q || q?.[0] !== fn2) { - continue; - } - const q0 = q[1]; - if (!q0) { - this.#queues.delete(path16); - continue; - } - q.shift(); - if (typeof q0 === "function") { - next.add(q0); - } else { - for (const f of q0) { - next.add(f); - } - } - } - for (const dir of dirs) { - const q = this.#queues.get(dir); - const q0 = q?.[0]; - if (!q || !(q0 instanceof Set)) - continue; - if (q0.size === 1 && q.length === 1) { - this.#queues.delete(dir); - continue; - } else if (q0.size === 1) { - q.shift(); - const n = q[0]; - if (typeof n === "function") { - next.add(n); - } - } else { - q0.delete(fn2); - } - } - this.#running.delete(fn2); - next.forEach((fn3) => this.#run(fn3)); - return true; - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/unpack.js -var import_node_assert, import_node_crypto, import_node_fs4, import_node_path7, ONENTRY, CHECKFS, CHECKFS2, ISREUSABLE, MAKEFS, FILE, DIRECTORY, LINK, SYMLINK, HARDLINK, UNSUPPORTED, CHECKPATH, MKDIR, ONERROR, PENDING, PEND, UNPEND, ENDED2, MAYBECLOSE, SKIP, DOCHOWN, UID, GID, CHECKED_CWD, platform4, isWindows3, DEFAULT_MAX_DEPTH, unlinkFile, unlinkFileSync, uint32, Unpack, callSync, UnpackSync; -var init_unpack = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/unpack.js"() { - init_esm2(); - import_node_assert = __toESM(require("node:assert"), 1); - import_node_crypto = require("node:crypto"); - import_node_fs4 = __toESM(require("node:fs"), 1); - import_node_path7 = __toESM(require("node:path"), 1); - init_get_write_flag(); - init_mkdir(); - init_normalize_windows_path(); - init_parse(); - init_strip_absolute_path(); - init_winchars(); - init_path_reservations(); - ONENTRY = Symbol("onEntry"); - CHECKFS = Symbol("checkFs"); - CHECKFS2 = Symbol("checkFs2"); - ISREUSABLE = Symbol("isReusable"); - MAKEFS = Symbol("makeFs"); - FILE = Symbol("file"); - DIRECTORY = Symbol("directory"); - LINK = Symbol("link"); - SYMLINK = Symbol("symlink"); - HARDLINK = Symbol("hardlink"); - UNSUPPORTED = Symbol("unsupported"); - CHECKPATH = Symbol("checkPath"); - MKDIR = Symbol("mkdir"); - ONERROR = Symbol("onError"); - PENDING = Symbol("pending"); - PEND = Symbol("pend"); - UNPEND = Symbol("unpend"); - ENDED2 = Symbol("ended"); - MAYBECLOSE = Symbol("maybeClose"); - SKIP = Symbol("skip"); - DOCHOWN = Symbol("doChown"); - UID = Symbol("uid"); - GID = Symbol("gid"); - CHECKED_CWD = Symbol("checkedCwd"); - platform4 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; - isWindows3 = platform4 === "win32"; - DEFAULT_MAX_DEPTH = 1024; - unlinkFile = (path16, cb) => { - if (!isWindows3) { - return import_node_fs4.default.unlink(path16, cb); - } - const name2 = path16 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex"); - import_node_fs4.default.rename(path16, name2, (er) => { - if (er) { - return cb(er); - } - import_node_fs4.default.unlink(name2, cb); - }); - }; - unlinkFileSync = (path16) => { - if (!isWindows3) { - return import_node_fs4.default.unlinkSync(path16); - } - const name2 = path16 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex"); - import_node_fs4.default.renameSync(path16, name2); - import_node_fs4.default.unlinkSync(name2); - }; - uint32 = (a, b, c) => a !== void 0 && a === a >>> 0 ? a : b !== void 0 && b === b >>> 0 ? b : c; - Unpack = class extends Parser { - [ENDED2] = false; - [CHECKED_CWD] = false; - [PENDING] = 0; - reservations = new PathReservations(); - transform; - writable = true; - readable = false; - uid; - gid; - setOwner; - preserveOwner; - processGid; - processUid; - maxDepth; - forceChown; - win32; - newer; - keep; - noMtime; - preservePaths; - unlink; - cwd; - strip; - processUmask; - umask; - dmode; - fmode; - chmod; - constructor(opt = {}) { - opt.ondone = () => { - this[ENDED2] = true; - this[MAYBECLOSE](); - }; - super(opt); - this.transform = opt.transform; - this.chmod = !!opt.chmod; - if (typeof opt.uid === "number" || typeof opt.gid === "number") { - if (typeof opt.uid !== "number" || typeof opt.gid !== "number") { - throw new TypeError("cannot set owner without number uid and gid"); - } - if (opt.preserveOwner) { - throw new TypeError("cannot preserve owner in archive and also set owner explicitly"); - } - this.uid = opt.uid; - this.gid = opt.gid; - this.setOwner = true; - } else { - this.uid = void 0; - this.gid = void 0; - this.setOwner = false; - } - if (opt.preserveOwner === void 0 && typeof opt.uid !== "number") { - this.preserveOwner = !!(process.getuid && process.getuid() === 0); - } else { - this.preserveOwner = !!opt.preserveOwner; - } - this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0; - this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0; - this.maxDepth = typeof opt.maxDepth === "number" ? opt.maxDepth : DEFAULT_MAX_DEPTH; - this.forceChown = opt.forceChown === true; - this.win32 = !!opt.win32 || isWindows3; - this.newer = !!opt.newer; - this.keep = !!opt.keep; - this.noMtime = !!opt.noMtime; - this.preservePaths = !!opt.preservePaths; - this.unlink = !!opt.unlink; - this.cwd = normalizeWindowsPath(import_node_path7.default.resolve(opt.cwd || process.cwd())); - this.strip = Number(opt.strip) || 0; - this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask(); - this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask; - this.dmode = opt.dmode || 511 & ~this.umask; - this.fmode = opt.fmode || 438 & ~this.umask; - this.on("entry", (entry) => this[ONENTRY](entry)); - } - // a bad or damaged archive is a warning for Parser, but an error - // when extracting. Mark those errors as unrecoverable, because - // the Unpack contract cannot be met. - warn(code2, msg, data = {}) { - if (code2 === "TAR_BAD_ARCHIVE" || code2 === "TAR_ABORT") { - data.recoverable = false; - } - return super.warn(code2, msg, data); - } - [MAYBECLOSE]() { - if (this[ENDED2] && this[PENDING] === 0) { - this.emit("prefinish"); - this.emit("finish"); - this.emit("end"); - } - } - [CHECKPATH](entry) { - const p = normalizeWindowsPath(entry.path); - const parts = p.split("/"); - if (this.strip) { - if (parts.length < this.strip) { - return false; - } - if (entry.type === "Link") { - const linkparts = normalizeWindowsPath(String(entry.linkpath)).split("/"); - if (linkparts.length >= this.strip) { - entry.linkpath = linkparts.slice(this.strip).join("/"); - } else { - return false; - } - } - parts.splice(0, this.strip); - entry.path = parts.join("/"); - } - if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { - this.warn("TAR_ENTRY_ERROR", "path excessively deep", { - entry, - path: p, - depth: parts.length, - maxDepth: this.maxDepth - }); - return false; - } - if (!this.preservePaths) { - if (parts.includes("..") || /* c8 ignore next */ - isWindows3 && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) { - this.warn("TAR_ENTRY_ERROR", `path contains '..'`, { - entry, - path: p - }); - return false; - } - const [root, stripped] = stripAbsolutePath(p); - if (root) { - entry.path = String(stripped); - this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute path`, { - entry, - path: p - }); - } - } - if (import_node_path7.default.isAbsolute(entry.path)) { - entry.absolute = normalizeWindowsPath(import_node_path7.default.resolve(entry.path)); - } else { - entry.absolute = normalizeWindowsPath(import_node_path7.default.resolve(this.cwd, entry.path)); - } - if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) { - this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { - entry, - path: normalizeWindowsPath(entry.path), - resolvedPath: entry.absolute, - cwd: this.cwd - }); - return false; - } - if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") { - return false; - } - if (this.win32) { - const { root: aRoot } = import_node_path7.default.win32.parse(String(entry.absolute)); - entry.absolute = aRoot + encode2(String(entry.absolute).slice(aRoot.length)); - const { root: pRoot } = import_node_path7.default.win32.parse(entry.path); - entry.path = pRoot + encode2(entry.path.slice(pRoot.length)); - } - return true; - } - [ONENTRY](entry) { - if (!this[CHECKPATH](entry)) { - return entry.resume(); - } - import_node_assert.default.equal(typeof entry.absolute, "string"); - switch (entry.type) { - case "Directory": - case "GNUDumpDir": - if (entry.mode) { - entry.mode = entry.mode | 448; - } - // eslint-disable-next-line no-fallthrough - case "File": - case "OldFile": - case "ContiguousFile": - case "Link": - case "SymbolicLink": - return this[CHECKFS](entry); - case "CharacterDevice": - case "BlockDevice": - case "FIFO": - default: - return this[UNSUPPORTED](entry); - } - } - [ONERROR](er, entry) { - if (er.name === "CwdError") { - this.emit("error", er); - } else { - this.warn("TAR_ENTRY_ERROR", er, { entry }); - this[UNPEND](); - entry.resume(); - } - } - [MKDIR](dir, mode, cb) { - mkdir(normalizeWindowsPath(dir), { - uid: this.uid, - gid: this.gid, - processUid: this.processUid, - processGid: this.processGid, - umask: this.processUmask, - preserve: this.preservePaths, - unlink: this.unlink, - cwd: this.cwd, - mode - }, cb); - } - [DOCHOWN](entry) { - return this.forceChown || this.preserveOwner && (typeof entry.uid === "number" && entry.uid !== this.processUid || typeof entry.gid === "number" && entry.gid !== this.processGid) || typeof this.uid === "number" && this.uid !== this.processUid || typeof this.gid === "number" && this.gid !== this.processGid; - } - [UID](entry) { - return uint32(this.uid, entry.uid, this.processUid); - } - [GID](entry) { - return uint32(this.gid, entry.gid, this.processGid); - } - [FILE](entry, fullyDone) { - const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.fmode; - const stream = new WriteStream(String(entry.absolute), { - // slight lie, but it can be numeric flags - flags: getWriteFlag(entry.size), - mode, - autoClose: false - }); - stream.on("error", (er) => { - if (stream.fd) { - import_node_fs4.default.close(stream.fd, () => { - }); - } - stream.write = () => true; - this[ONERROR](er, entry); - fullyDone(); - }); - let actions = 1; - const done = (er) => { - if (er) { - if (stream.fd) { - import_node_fs4.default.close(stream.fd, () => { - }); - } - this[ONERROR](er, entry); - fullyDone(); - return; - } - if (--actions === 0) { - if (stream.fd !== void 0) { - import_node_fs4.default.close(stream.fd, (er2) => { - if (er2) { - this[ONERROR](er2, entry); - } else { - this[UNPEND](); - } - fullyDone(); - }); - } - } - }; - stream.on("finish", () => { - const abs = String(entry.absolute); - const fd = stream.fd; - if (typeof fd === "number" && entry.mtime && !this.noMtime) { - actions++; - const atime = entry.atime || /* @__PURE__ */ new Date(); - const mtime = entry.mtime; - import_node_fs4.default.futimes(fd, atime, mtime, (er) => er ? import_node_fs4.default.utimes(abs, atime, mtime, (er2) => done(er2 && er)) : done()); - } - if (typeof fd === "number" && this[DOCHOWN](entry)) { - actions++; - const uid = this[UID](entry); - const gid = this[GID](entry); - if (typeof uid === "number" && typeof gid === "number") { - import_node_fs4.default.fchown(fd, uid, gid, (er) => er ? import_node_fs4.default.chown(abs, uid, gid, (er2) => done(er2 && er)) : done()); - } - } - done(); - }); - const tx = this.transform ? this.transform(entry) || entry : entry; - if (tx !== entry) { - tx.on("error", (er) => { - this[ONERROR](er, entry); - fullyDone(); - }); - entry.pipe(tx); - } - tx.pipe(stream); - } - [DIRECTORY](entry, fullyDone) { - const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.dmode; - this[MKDIR](String(entry.absolute), mode, (er) => { - if (er) { - this[ONERROR](er, entry); - fullyDone(); - return; - } - let actions = 1; - const done = () => { - if (--actions === 0) { - fullyDone(); - this[UNPEND](); - entry.resume(); - } - }; - if (entry.mtime && !this.noMtime) { - actions++; - import_node_fs4.default.utimes(String(entry.absolute), entry.atime || /* @__PURE__ */ new Date(), entry.mtime, done); - } - if (this[DOCHOWN](entry)) { - actions++; - import_node_fs4.default.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); - } - done(); - }); - } - [UNSUPPORTED](entry) { - entry.unsupported = true; - this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${entry.type}`, { entry }); - entry.resume(); - } - [SYMLINK](entry, done) { - this[LINK](entry, String(entry.linkpath), "symlink", done); - } - [HARDLINK](entry, done) { - const linkpath = normalizeWindowsPath(import_node_path7.default.resolve(this.cwd, String(entry.linkpath))); - this[LINK](entry, linkpath, "link", done); - } - [PEND]() { - this[PENDING]++; - } - [UNPEND]() { - this[PENDING]--; - this[MAYBECLOSE](); - } - [SKIP](entry) { - this[UNPEND](); - entry.resume(); - } - // Check if we can reuse an existing filesystem entry safely and - // overwrite it, rather than unlinking and recreating - // Windows doesn't report a useful nlink, so we just never reuse entries - [ISREUSABLE](entry, st) { - return entry.type === "File" && !this.unlink && st.isFile() && st.nlink <= 1 && !isWindows3; - } - // check if a thing is there, and if so, try to clobber it - [CHECKFS](entry) { - this[PEND](); - const paths = [entry.path]; - if (entry.linkpath) { - paths.push(entry.linkpath); - } - this.reservations.reserve(paths, (done) => this[CHECKFS2](entry, done)); - } - [CHECKFS2](entry, fullyDone) { - const done = (er) => { - fullyDone(er); - }; - const checkCwd2 = () => { - this[MKDIR](this.cwd, this.dmode, (er) => { - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - this[CHECKED_CWD] = true; - start(); - }); - }; - const start = () => { - if (entry.absolute !== this.cwd) { - const parent = normalizeWindowsPath(import_node_path7.default.dirname(String(entry.absolute))); - if (parent !== this.cwd) { - return this[MKDIR](parent, this.dmode, (er) => { - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - afterMakeParent(); - }); - } - } - afterMakeParent(); - }; - const afterMakeParent = () => { - import_node_fs4.default.lstat(String(entry.absolute), (lstatEr, st) => { - if (st && (this.keep || /* c8 ignore next */ - this.newer && st.mtime > (entry.mtime ?? st.mtime))) { - this[SKIP](entry); - done(); - return; - } - if (lstatEr || this[ISREUSABLE](entry, st)) { - return this[MAKEFS](null, entry, done); - } - if (st.isDirectory()) { - if (entry.type === "Directory") { - const needChmod = this.chmod && entry.mode && (st.mode & 4095) !== entry.mode; - const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); - if (!needChmod) { - return afterChmod(); - } - return import_node_fs4.default.chmod(String(entry.absolute), Number(entry.mode), afterChmod); - } - if (entry.absolute !== this.cwd) { - return import_node_fs4.default.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); - } - } - if (entry.absolute === this.cwd) { - return this[MAKEFS](null, entry, done); - } - unlinkFile(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); - }); - }; - if (this[CHECKED_CWD]) { - start(); - } else { - checkCwd2(); - } - } - [MAKEFS](er, entry, done) { - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - switch (entry.type) { - case "File": - case "OldFile": - case "ContiguousFile": - return this[FILE](entry, done); - case "Link": - return this[HARDLINK](entry, done); - case "SymbolicLink": - return this[SYMLINK](entry, done); - case "Directory": - case "GNUDumpDir": - return this[DIRECTORY](entry, done); - } - } - [LINK](entry, linkpath, link, done) { - import_node_fs4.default[link](linkpath, String(entry.absolute), (er) => { - if (er) { - this[ONERROR](er, entry); - } else { - this[UNPEND](); - entry.resume(); - } - done(); - }); - } - }; - callSync = (fn2) => { - try { - return [null, fn2()]; - } catch (er) { - return [er, null]; - } - }; - UnpackSync = class extends Unpack { - sync = true; - [MAKEFS](er, entry) { - return super[MAKEFS](er, entry, () => { - }); - } - [CHECKFS](entry) { - if (!this[CHECKED_CWD]) { - const er2 = this[MKDIR](this.cwd, this.dmode); - if (er2) { - return this[ONERROR](er2, entry); - } - this[CHECKED_CWD] = true; - } - if (entry.absolute !== this.cwd) { - const parent = normalizeWindowsPath(import_node_path7.default.dirname(String(entry.absolute))); - if (parent !== this.cwd) { - const mkParent = this[MKDIR](parent, this.dmode); - if (mkParent) { - return this[ONERROR](mkParent, entry); - } - } - } - const [lstatEr, st] = callSync(() => import_node_fs4.default.lstatSync(String(entry.absolute))); - if (st && (this.keep || /* c8 ignore next */ - this.newer && st.mtime > (entry.mtime ?? st.mtime))) { - return this[SKIP](entry); - } - if (lstatEr || this[ISREUSABLE](entry, st)) { - return this[MAKEFS](null, entry); - } - if (st.isDirectory()) { - if (entry.type === "Directory") { - const needChmod = this.chmod && entry.mode && (st.mode & 4095) !== entry.mode; - const [er3] = needChmod ? callSync(() => { - import_node_fs4.default.chmodSync(String(entry.absolute), Number(entry.mode)); - }) : []; - return this[MAKEFS](er3, entry); - } - const [er2] = callSync(() => import_node_fs4.default.rmdirSync(String(entry.absolute))); - this[MAKEFS](er2, entry); - } - const [er] = entry.absolute === this.cwd ? [] : callSync(() => unlinkFileSync(String(entry.absolute))); - this[MAKEFS](er, entry); - } - [FILE](entry, done) { - const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.fmode; - const oner = (er) => { - let closeError; - try { - import_node_fs4.default.closeSync(fd); - } catch (e) { - closeError = e; - } - if (er || closeError) { - this[ONERROR](er || closeError, entry); - } - done(); - }; - let fd; - try { - fd = import_node_fs4.default.openSync(String(entry.absolute), getWriteFlag(entry.size), mode); - } catch (er) { - return oner(er); - } - const tx = this.transform ? this.transform(entry) || entry : entry; - if (tx !== entry) { - tx.on("error", (er) => this[ONERROR](er, entry)); - entry.pipe(tx); - } - tx.on("data", (chunk) => { - try { - import_node_fs4.default.writeSync(fd, chunk, 0, chunk.length); - } catch (er) { - oner(er); - } - }); - tx.on("end", () => { - let er = null; - if (entry.mtime && !this.noMtime) { - const atime = entry.atime || /* @__PURE__ */ new Date(); - const mtime = entry.mtime; - try { - import_node_fs4.default.futimesSync(fd, atime, mtime); - } catch (futimeser) { - try { - import_node_fs4.default.utimesSync(String(entry.absolute), atime, mtime); - } catch (utimeser) { - er = futimeser; - } - } - } - if (this[DOCHOWN](entry)) { - const uid = this[UID](entry); - const gid = this[GID](entry); - try { - import_node_fs4.default.fchownSync(fd, Number(uid), Number(gid)); - } catch (fchowner) { - try { - import_node_fs4.default.chownSync(String(entry.absolute), Number(uid), Number(gid)); - } catch (chowner) { - er = er || fchowner; - } - } - } - oner(er); - }); - } - [DIRECTORY](entry, done) { - const mode = typeof entry.mode === "number" ? entry.mode & 4095 : this.dmode; - const er = this[MKDIR](String(entry.absolute), mode); - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - if (entry.mtime && !this.noMtime) { - try { - import_node_fs4.default.utimesSync(String(entry.absolute), entry.atime || /* @__PURE__ */ new Date(), entry.mtime); - } catch (er2) { - } - } - if (this[DOCHOWN](entry)) { - try { - import_node_fs4.default.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); - } catch (er2) { - } - } - done(); - entry.resume(); - } - [MKDIR](dir, mode) { - try { - return mkdirSync2(normalizeWindowsPath(dir), { - uid: this.uid, - gid: this.gid, - processUid: this.processUid, - processGid: this.processGid, - umask: this.processUmask, - preserve: this.preservePaths, - unlink: this.unlink, - cwd: this.cwd, - mode - }); - } catch (er) { - return er; - } - } - [LINK](entry, linkpath, link, done) { - const ls = `${link}Sync`; - try { - import_node_fs4.default[ls](linkpath, String(entry.absolute)); - done(); - entry.resume(); - } catch (er) { - return this[ONERROR](er, entry); - } - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/extract.js -var extract_exports = {}; -__export(extract_exports, { - extract: () => extract -}); -var import_node_fs5, extractFileSync, extractFile, extract; -var init_extract = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/extract.js"() { - init_esm2(); - import_node_fs5 = __toESM(require("node:fs"), 1); - init_list(); - init_make_command(); - init_unpack(); - extractFileSync = (opt) => { - const u = new UnpackSync(opt); - const file = opt.file; - const stat = import_node_fs5.default.statSync(file); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - const stream = new ReadStreamSync(file, { - readSize, - size: stat.size - }); - stream.pipe(u); - }; - extractFile = (opt, _) => { - const u = new Unpack(opt); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - const file = opt.file; - const p = new Promise((resolve, reject) => { - u.on("error", reject); - u.on("close", resolve); - import_node_fs5.default.stat(file, (er, stat) => { - if (er) { - reject(er); - } else { - const stream = new ReadStream(file, { - readSize, - size: stat.size - }); - stream.on("error", reject); - stream.pipe(u); - } - }); - }); - return p; - }; - extract = makeCommand(extractFileSync, extractFile, (opt) => new UnpackSync(opt), (opt) => new Unpack(opt), (opt, files) => { - if (files?.length) - filesFilter(opt, files); - }); - } -}); - -// .yarn/cache/v8-compile-cache-npm-2.4.0-5979f8e405-3878511925.zip/node_modules/v8-compile-cache/v8-compile-cache.js -var require_v8_compile_cache = __commonJS({ - ".yarn/cache/v8-compile-cache-npm-2.4.0-5979f8e405-3878511925.zip/node_modules/v8-compile-cache/v8-compile-cache.js"(exports2, module2) { - "use strict"; - var Module2 = require("module"); - var crypto = require("crypto"); - var fs17 = require("fs"); - var path16 = require("path"); - var vm = require("vm"); - var os3 = require("os"); - var hasOwnProperty = Object.prototype.hasOwnProperty; - var FileSystemBlobStore = class { - constructor(directory, prefix) { - const name2 = prefix ? slashEscape(prefix + ".") : ""; - this._blobFilename = path16.join(directory, name2 + "BLOB"); - this._mapFilename = path16.join(directory, name2 + "MAP"); - this._lockFilename = path16.join(directory, name2 + "LOCK"); - this._directory = directory; - this._load(); - } - has(key, invalidationKey) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - return this._invalidationKeys[key] === invalidationKey; - } else if (hasOwnProperty.call(this._storedMap, key)) { - return this._storedMap[key][0] === invalidationKey; - } - return false; - } - get(key, invalidationKey) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - if (this._invalidationKeys[key] === invalidationKey) { - return this._memoryBlobs[key]; - } - } else if (hasOwnProperty.call(this._storedMap, key)) { - const mapping = this._storedMap[key]; - if (mapping[0] === invalidationKey) { - return this._storedBlob.slice(mapping[1], mapping[2]); - } - } - } - set(key, invalidationKey, buffer) { - this._invalidationKeys[key] = invalidationKey; - this._memoryBlobs[key] = buffer; - this._dirty = true; - } - delete(key) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - this._dirty = true; - delete this._memoryBlobs[key]; - } - if (hasOwnProperty.call(this._invalidationKeys, key)) { - this._dirty = true; - delete this._invalidationKeys[key]; - } - if (hasOwnProperty.call(this._storedMap, key)) { - this._dirty = true; - delete this._storedMap[key]; - } - } - isDirty() { - return this._dirty; - } - save() { - const dump = this._getDump(); - const blobToStore = Buffer.concat(dump[0]); - const mapToStore = JSON.stringify(dump[1]); - try { - mkdirpSync(this._directory); - fs17.writeFileSync(this._lockFilename, "LOCK", { flag: "wx" }); - } catch (error) { - return false; - } - try { - fs17.writeFileSync(this._blobFilename, blobToStore); - fs17.writeFileSync(this._mapFilename, mapToStore); - } finally { - fs17.unlinkSync(this._lockFilename); - } - return true; - } - _load() { - try { - this._storedBlob = fs17.readFileSync(this._blobFilename); - this._storedMap = JSON.parse(fs17.readFileSync(this._mapFilename)); - } catch (e) { - this._storedBlob = Buffer.alloc(0); - this._storedMap = {}; - } - this._dirty = false; - this._memoryBlobs = {}; - this._invalidationKeys = {}; - } - _getDump() { - const buffers = []; - const newMap = {}; - let offset = 0; - function push2(key, invalidationKey, buffer) { - buffers.push(buffer); - newMap[key] = [invalidationKey, offset, offset + buffer.length]; - offset += buffer.length; - } - for (const key of Object.keys(this._memoryBlobs)) { - const buffer = this._memoryBlobs[key]; - const invalidationKey = this._invalidationKeys[key]; - push2(key, invalidationKey, buffer); - } - for (const key of Object.keys(this._storedMap)) { - if (hasOwnProperty.call(newMap, key)) continue; - const mapping = this._storedMap[key]; - const buffer = this._storedBlob.slice(mapping[1], mapping[2]); - push2(key, mapping[0], buffer); - } - return [buffers, newMap]; - } - }; - var NativeCompileCache = class { - constructor() { - this._cacheStore = null; - this._previousModuleCompile = null; - } - setCacheStore(cacheStore) { - this._cacheStore = cacheStore; - } - install() { - const self2 = this; - const hasRequireResolvePaths = typeof require.resolve.paths === "function"; - this._previousModuleCompile = Module2.prototype._compile; - Module2.prototype._compile = function(content, filename) { - const mod = this; - function require2(id) { - return mod.require(id); - } - function resolve(request, options) { - return Module2._resolveFilename(request, mod, false, options); - } - require2.resolve = resolve; - if (hasRequireResolvePaths) { - resolve.paths = function paths(request) { - return Module2._resolveLookupPaths(request, mod, true); - }; - } - require2.main = process.mainModule; - require2.extensions = Module2._extensions; - require2.cache = Module2._cache; - const dirname2 = path16.dirname(filename); - const compiledWrapper = self2._moduleCompile(filename, content); - const args = [mod.exports, require2, mod, filename, dirname2, process, global, Buffer]; - return compiledWrapper.apply(mod.exports, args); - }; - } - uninstall() { - Module2.prototype._compile = this._previousModuleCompile; - } - _moduleCompile(filename, content) { - var contLen = content.length; - if (contLen >= 2) { - if (content.charCodeAt(0) === 35 && content.charCodeAt(1) === 33) { - if (contLen === 2) { - content = ""; - } else { - var i = 2; - for (; i < contLen; ++i) { - var code2 = content.charCodeAt(i); - if (code2 === 10 || code2 === 13) break; - } - if (i === contLen) { - content = ""; - } else { - content = content.slice(i); - } - } - } - } - var wrapper = Module2.wrap(content); - var invalidationKey = crypto.createHash("sha1").update(content, "utf8").digest("hex"); - var buffer = this._cacheStore.get(filename, invalidationKey); - var script = new vm.Script(wrapper, { - filename, - lineOffset: 0, - displayErrors: true, - cachedData: buffer, - produceCachedData: true - }); - if (script.cachedDataProduced) { - this._cacheStore.set(filename, invalidationKey, script.cachedData); - } else if (script.cachedDataRejected) { - this._cacheStore.delete(filename); - } - var compiledWrapper = script.runInThisContext({ - filename, - lineOffset: 0, - columnOffset: 0, - displayErrors: true - }); - return compiledWrapper; - } - }; - function mkdirpSync(p_) { - _mkdirpSync(path16.resolve(p_), 511); - } - function _mkdirpSync(p, mode) { - try { - fs17.mkdirSync(p, mode); - } catch (err0) { - if (err0.code === "ENOENT") { - _mkdirpSync(path16.dirname(p)); - _mkdirpSync(p); - } else { - try { - const stat = fs17.statSync(p); - if (!stat.isDirectory()) { - throw err0; - } - } catch (err1) { - throw err0; - } - } - } - } - function slashEscape(str) { - const ESCAPE_LOOKUP = { - "\\": "zB", - ":": "zC", - "/": "zS", - "\0": "z0", - "z": "zZ" - }; - const ESCAPE_REGEX = /[\\:/\x00z]/g; - return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]); - } - function supportsCachedData() { - const script = new vm.Script('""', { produceCachedData: true }); - return script.cachedDataProduced === true; - } - function getCacheDir() { - const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR; - if (v8_compile_cache_cache_dir) { - return v8_compile_cache_cache_dir; - } - const dirname2 = typeof process.getuid === "function" ? "v8-compile-cache-" + process.getuid() : "v8-compile-cache"; - const arch = process.arch; - const version2 = typeof process.versions.v8 === "string" ? process.versions.v8 : typeof process.versions.chakracore === "string" ? "chakracore-" + process.versions.chakracore : "node-" + process.version; - const cacheDir = path16.join(os3.tmpdir(), dirname2, arch, version2); - return cacheDir; - } - function getMainName() { - const mainName = require.main && typeof require.main.filename === "string" ? require.main.filename : process.cwd(); - return mainName; - } - if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { - const cacheDir = getCacheDir(); - const prefix = getMainName(); - const blobStore = new FileSystemBlobStore(cacheDir, prefix); - const nativeCompileCache = new NativeCompileCache(); - nativeCompileCache.setCacheStore(blobStore); - nativeCompileCache.install(); - process.once("exit", () => { - if (blobStore.isDirty()) { - blobStore.save(); - } - nativeCompileCache.uninstall(); - }); - } - module2.exports.__TEST__ = { - FileSystemBlobStore, - NativeCompileCache, - mkdirpSync, - slashEscape, - supportsCachedData, - getCacheDir, - getMainName - }; - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/satisfies.js -var require_satisfies = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/satisfies.js"(exports2, module2) { - "use strict"; - var Range3 = require_range(); - var satisfies = (version2, range, options) => { - try { - range = new Range3(range, options); - } catch (er) { - return false; - } - return range.test(version2); - }; - module2.exports = satisfies; - } -}); - -// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/posix.js -var require_posix = __commonJS({ - ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/posix.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.sync = exports2.isexe = void 0; - var fs_1 = require("fs"); - var promises_1 = require("fs/promises"); - var isexe = async (path16, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(await (0, promises_1.stat)(path16), options); - } catch (e) { - const er = e; - if (ignoreErrors || er.code === "EACCES") - return false; - throw er; - } - }; - exports2.isexe = isexe; - var sync = (path16, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat((0, fs_1.statSync)(path16), options); - } catch (e) { - const er = e; - if (ignoreErrors || er.code === "EACCES") - return false; - throw er; - } - }; - exports2.sync = sync; - var checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); - var checkMode = (stat, options) => { - const myUid = options.uid ?? process.getuid?.(); - const myGroups = options.groups ?? process.getgroups?.() ?? []; - const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; - if (myUid === void 0 || myGid === void 0) { - throw new Error("cannot get uid or gid"); - } - const groups = /* @__PURE__ */ new Set([myGid, ...myGroups]); - const mod = stat.mode; - const uid = stat.uid; - const gid = stat.gid; - const u = parseInt("100", 8); - const g = parseInt("010", 8); - const o = parseInt("001", 8); - const ug = u | g; - return !!(mod & o || mod & g && groups.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0); - }; - } -}); - -// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/win32.js -var require_win32 = __commonJS({ - ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/win32.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.sync = exports2.isexe = void 0; - var fs_1 = require("fs"); - var promises_1 = require("fs/promises"); - var isexe = async (path16, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(await (0, promises_1.stat)(path16), path16, options); - } catch (e) { - const er = e; - if (ignoreErrors || er.code === "EACCES") - return false; - throw er; - } - }; - exports2.isexe = isexe; - var sync = (path16, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat((0, fs_1.statSync)(path16), path16, options); - } catch (e) { - const er = e; - if (ignoreErrors || er.code === "EACCES") - return false; - throw er; - } - }; - exports2.sync = sync; - var checkPathExt = (path16, options) => { - const { pathExt = process.env.PATHEXT || "" } = options; - const peSplit = pathExt.split(";"); - if (peSplit.indexOf("") !== -1) { - return true; - } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); - const ext = path16.substring(path16.length - p.length).toLowerCase(); - if (p && ext === p) { - return true; - } - } - return false; - }; - var checkStat = (stat, path16, options) => stat.isFile() && checkPathExt(path16, options); - } -}); - -// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/options.js -var require_options = __commonJS({ - ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/options.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// .yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/index.js -var require_cjs = __commonJS({ - ".yarn/cache/isexe-npm-3.1.1-9c0061eead-9ec2576540.zip/node_modules/isexe/dist/cjs/index.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc2 = Object.getOwnPropertyDescriptor(m, k); - if (!desc2 || ("get" in desc2 ? !m.__esModule : desc2.writable || desc2.configurable)) { - desc2 = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc2); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.sync = exports2.isexe = exports2.posix = exports2.win32 = void 0; - var posix = __importStar(require_posix()); - exports2.posix = posix; - var win322 = __importStar(require_win32()); - exports2.win32 = win322; - __exportStar(require_options(), exports2); - var platform5 = process.env._ISEXE_TEST_PLATFORM_ || process.platform; - var impl = platform5 === "win32" ? win322 : posix; - exports2.isexe = impl.isexe; - exports2.sync = impl.sync; - } -}); - -// .yarn/cache/which-npm-5.0.0-15aa39eb60-e556e4cd8b.zip/node_modules/which/lib/index.js -var require_lib = __commonJS({ - ".yarn/cache/which-npm-5.0.0-15aa39eb60-e556e4cd8b.zip/node_modules/which/lib/index.js"(exports2, module2) { - var { isexe, sync: isexeSync } = require_cjs(); - var { join: join3, delimiter, sep, posix } = require("path"); - var isWindows4 = process.platform === "win32"; - var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1")); - var rRel = new RegExp(`^\\.${rSlash.source}`); - var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); - var getPathInfo = (cmd, { - path: optPath = process.env.PATH, - pathExt: optPathExt = process.env.PATHEXT, - delimiter: optDelimiter = delimiter - }) => { - const pathEnv = cmd.match(rSlash) ? [""] : [ - // windows always checks the cwd first - ...isWindows4 ? [process.cwd()] : [], - ...(optPath || /* istanbul ignore next: very unusual */ - "").split(optDelimiter) - ]; - if (isWindows4) { - const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter); - const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]); - if (cmd.includes(".") && pathExt[0] !== "") { - pathExt.unshift(""); - } - return { pathEnv, pathExt, pathExtExe }; - } - return { pathEnv, pathExt: [""] }; - }; - var getPathPart = (raw2, cmd) => { - const pathPart = /^".*"$/.test(raw2) ? raw2.slice(1, -1) : raw2; - const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ""; - return prefix + join3(pathPart, cmd); - }; - var which3 = async (cmd, opt = {}) => { - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - for (const envPart of pathEnv) { - const p = getPathPart(envPart, cmd); - for (const ext of pathExt) { - const withExt = p + ext; - const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true }); - if (is) { - if (!opt.all) { - return withExt; - } - found.push(withExt); - } - } - } - if (opt.all && found.length) { - return found; - } - if (opt.nothrow) { - return null; - } - throw getNotFoundError(cmd); - }; - var whichSync = (cmd, opt = {}) => { - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - for (const pathEnvPart of pathEnv) { - const p = getPathPart(pathEnvPart, cmd); - for (const ext of pathExt) { - const withExt = p + ext; - const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }); - if (is) { - if (!opt.all) { - return withExt; - } - found.push(withExt); - } - } - } - if (opt.all && found.length) { - return found; - } - if (opt.nothrow) { - return null; - } - throw getNotFoundError(cmd); - }; - module2.exports = which3; - which3.sync = whichSync; - } -}); - -// .yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-b32f418ab3.zip/node_modules/is-windows/index.js -var require_is_windows = __commonJS({ - ".yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-b32f418ab3.zip/node_modules/is-windows/index.js"(exports2, module2) { - (function(factory) { - if (exports2 && typeof exports2 === "object" && typeof module2 !== "undefined") { - module2.exports = factory(); - } else if (typeof define === "function" && define.amd) { - define([], factory); - } else if (typeof window !== "undefined") { - window.isWindows = factory(); - } else if (typeof global !== "undefined") { - global.isWindows = factory(); - } else if (typeof self !== "undefined") { - self.isWindows = factory(); - } else { - this.isWindows = factory(); - } - })(function() { - "use strict"; - return function isWindows4() { - return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE)); - }; - }); - } -}); - -// .yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-acdb425d51.zip/node_modules/cmd-extension/index.js -var require_cmd_extension = __commonJS({ - ".yarn/cache/cmd-extension-npm-1.0.2-11aa204c4b-acdb425d51.zip/node_modules/cmd-extension/index.js"(exports2, module2) { - "use strict"; - var path16 = require("path"); - var cmdExtension; - if (process.env.PATHEXT) { - cmdExtension = process.env.PATHEXT.split(path16.delimiter).find((ext) => ext.toUpperCase() === ".CMD"); - } - module2.exports = cmdExtension || ".cmd"; - } -}); - -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants2 = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform5 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs17) { - if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs17); - } - if (!fs17.lutimes) { - patchLutimes(fs17); - } - fs17.chown = chownFix(fs17.chown); - fs17.fchown = chownFix(fs17.fchown); - fs17.lchown = chownFix(fs17.lchown); - fs17.chmod = chmodFix(fs17.chmod); - fs17.fchmod = chmodFix(fs17.fchmod); - fs17.lchmod = chmodFix(fs17.lchmod); - fs17.chownSync = chownFixSync(fs17.chownSync); - fs17.fchownSync = chownFixSync(fs17.fchownSync); - fs17.lchownSync = chownFixSync(fs17.lchownSync); - fs17.chmodSync = chmodFixSync(fs17.chmodSync); - fs17.fchmodSync = chmodFixSync(fs17.fchmodSync); - fs17.lchmodSync = chmodFixSync(fs17.lchmodSync); - fs17.stat = statFix(fs17.stat); - fs17.fstat = statFix(fs17.fstat); - fs17.lstat = statFix(fs17.lstat); - fs17.statSync = statFixSync(fs17.statSync); - fs17.fstatSync = statFixSync(fs17.fstatSync); - fs17.lstatSync = statFixSync(fs17.lstatSync); - if (fs17.chmod && !fs17.lchmod) { - fs17.lchmod = function(path16, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs17.lchmodSync = function() { - }; - } - if (fs17.chown && !fs17.lchown) { - fs17.lchown = function(path16, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs17.lchownSync = function() { - }; - } - if (platform5 === "win32") { - fs17.rename = typeof fs17.rename !== "function" ? fs17.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { - setTimeout(function() { - fs17.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs17.rename); - } - fs17.read = typeof fs17.read !== "function" ? fs17.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs17, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs17, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs17.read); - fs17.readSync = typeof fs17.readSync !== "function" ? fs17.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs17, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs17.readSync); - function patchLchmod(fs18) { - fs18.lchmod = function(path16, mode, callback) { - fs18.open( - path16, - constants2.O_WRONLY | constants2.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs18.fchmod(fd, mode, function(err2) { - fs18.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs18.lchmodSync = function(path16, mode) { - var fd = fs18.openSync(path16, constants2.O_WRONLY | constants2.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs18.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs18.closeSync(fd); - } catch (er) { - } - } else { - fs18.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs18) { - if (constants2.hasOwnProperty("O_SYMLINK") && fs18.futimes) { - fs18.lutimes = function(path16, at, mt, cb) { - fs18.open(path16, constants2.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs18.futimes(fd, at, mt, function(er2) { - fs18.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs18.lutimesSync = function(path16, at, mt) { - var fd = fs18.openSync(path16, constants2.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs18.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs18.closeSync(fd); - } catch (er) { - } - } else { - fs18.closeSync(fd); - } - } - return ret; - }; - } else if (fs18.futimes) { - fs18.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs18.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs17, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs17, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs17, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs17, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs17, target, options, callback) : orig.call(fs17, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs17, target, options) : orig.call(fs17, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream2 = require("stream").Stream; - module2.exports = legacy; - function legacy(fs17) { - return { - ReadStream: ReadStream2, - WriteStream: WriteStream2 - }; - function ReadStream2(path16, options) { - if (!(this instanceof ReadStream2)) return new ReadStream2(path16, options); - Stream2.call(this); - var self2 = this; - this.path = path16; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs17.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream2(path16, options) { - if (!(this instanceof WriteStream2)) return new WriteStream2(path16, options); - Stream2.call(this); - this.path = path16; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs17.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// .yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - ".yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs17 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop3() { - } - function publishQueue(context, queue2) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug2 = noop3; - if (util.debuglog) - debug2 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug2 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs17[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs17, queue); - fs17.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs17, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs17.close); - fs17.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs17, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs17.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug2(fs17[gracefulQueue]); - require("assert").equal(fs17[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs17[gracefulQueue]); - } - module2.exports = patch(clone(fs17)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs17.__patched) { - module2.exports = patch(fs17); - fs17.__patched = true; - } - function patch(fs18) { - polyfills(fs18); - fs18.gracefulify = patch; - fs18.createReadStream = createReadStream; - fs18.createWriteStream = createWriteStream; - var fs$readFile = fs18.readFile; - fs18.readFile = readFile; - function readFile(path16, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path16, options, cb); - function go$readFile(path17, options2, cb2, startTime) { - return fs$readFile(path17, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path17, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs18.writeFile; - fs18.writeFile = writeFile; - function writeFile(path16, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path16, data, options, cb); - function go$writeFile(path17, data2, options2, cb2, startTime) { - return fs$writeFile(path17, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs18.appendFile; - if (fs$appendFile) - fs18.appendFile = appendFile; - function appendFile(path16, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path16, data, options, cb); - function go$appendFile(path17, data2, options2, cb2, startTime) { - return fs$appendFile(path17, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs18.copyFile; - if (fs$copyFile) - fs18.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs18.readdir; - fs18.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path16, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path17, options2, cb2, startTime) { - return fs$readdir(path17, fs$readdirCallback( - path17, - options2, - cb2, - startTime - )); - } : function go$readdir2(path17, options2, cb2, startTime) { - return fs$readdir(path17, options2, fs$readdirCallback( - path17, - options2, - cb2, - startTime - )); - }; - return go$readdir(path16, options, cb); - function fs$readdirCallback(path17, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path17, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs18); - ReadStream2 = legStreams.ReadStream; - WriteStream2 = legStreams.WriteStream; - } - var fs$ReadStream = fs18.ReadStream; - if (fs$ReadStream) { - ReadStream2.prototype = Object.create(fs$ReadStream.prototype); - ReadStream2.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs18.WriteStream; - if (fs$WriteStream) { - WriteStream2.prototype = Object.create(fs$WriteStream.prototype); - WriteStream2.prototype.open = WriteStream$open; - } - Object.defineProperty(fs18, "ReadStream", { - get: function() { - return ReadStream2; - }, - set: function(val) { - ReadStream2 = val; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs18, "WriteStream", { - get: function() { - return WriteStream2; - }, - set: function(val) { - WriteStream2 = val; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream2; - Object.defineProperty(fs18, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val) { - FileReadStream = val; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream2; - Object.defineProperty(fs18, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val) { - FileWriteStream = val; - }, - enumerable: true, - configurable: true - }); - function ReadStream2(path16, options) { - if (this instanceof ReadStream2) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream2.apply(Object.create(ReadStream2.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream2(path16, options) { - if (this instanceof WriteStream2) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream2.apply(Object.create(WriteStream2.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path16, options) { - return new fs18.ReadStream(path16, options); - } - function createWriteStream(path16, options) { - return new fs18.WriteStream(path16, options); - } - var fs$open = fs18.open; - fs18.open = open; - function open(path16, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path16, flags, mode, cb); - function go$open(path17, flags2, mode2, cb2, startTime) { - return fs$open(path17, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path17, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs18; - } - function enqueue(elem) { - debug2("ENQUEUE", elem[0].name, elem[1]); - fs17[gracefulQueue].push(elem); - retry(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs17[gracefulQueue].length; ++i) { - if (fs17[gracefulQueue][i].length > 2) { - fs17[gracefulQueue][i][3] = now; - fs17[gracefulQueue][i][4] = now; - } - } - retry(); - } - function retry() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs17[gracefulQueue].length === 0) - return; - var elem = fs17[gracefulQueue].shift(); - var fn2 = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug2("RETRY", fn2.name, args); - fn2.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug2("TIMEOUT", fn2.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug2("RETRY", fn2.name, args); - fn2.apply(null, args.concat([startTime])); - } else { - fs17[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry, 0); - } - } - } -}); - -// .yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-ba1442ba1e.zip/node_modules/@zkochan/cmd-shim/index.js -var require_cmd_shim = __commonJS({ - ".yarn/cache/@zkochan-cmd-shim-npm-6.0.0-97792a7373-ba1442ba1e.zip/node_modules/@zkochan/cmd-shim/index.js"(exports2, module2) { - "use strict"; - cmdShim2.ifExists = cmdShimIfExists; - var util_1 = require("util"); - var path16 = require("path"); - var isWindows4 = require_is_windows(); - var CMD_EXTENSION = require_cmd_extension(); - var shebangExpr = /^#!\s*(?:\/usr\/bin\/env(?:\s+-S\s*)?)?\s*([^ \t]+)(.*)$/; - var DEFAULT_OPTIONS = { - // Create PowerShell file by default if the option hasn't been specified - createPwshFile: true, - createCmdFile: isWindows4(), - fs: require_graceful_fs() - }; - var extensionToProgramMap = /* @__PURE__ */ new Map([ - [".js", "node"], - [".cjs", "node"], - [".mjs", "node"], - [".cmd", "cmd"], - [".bat", "cmd"], - [".ps1", "pwsh"], - [".sh", "sh"] - ]); - function ingestOptions(opts) { - const opts_ = { ...DEFAULT_OPTIONS, ...opts }; - const fs17 = opts_.fs; - opts_.fs_ = { - chmod: fs17.chmod ? (0, util_1.promisify)(fs17.chmod) : (async () => { - }), - mkdir: (0, util_1.promisify)(fs17.mkdir), - readFile: (0, util_1.promisify)(fs17.readFile), - stat: (0, util_1.promisify)(fs17.stat), - unlink: (0, util_1.promisify)(fs17.unlink), - writeFile: (0, util_1.promisify)(fs17.writeFile) - }; - return opts_; - } - async function cmdShim2(src, to, opts) { - const opts_ = ingestOptions(opts); - await cmdShim_(src, to, opts_); - } - function cmdShimIfExists(src, to, opts) { - return cmdShim2(src, to, opts).catch(() => { - }); - } - function rm(path17, opts) { - return opts.fs_.unlink(path17).catch(() => { - }); - } - async function cmdShim_(src, to, opts) { - const srcRuntimeInfo = await searchScriptRuntime(src, opts); - await writeShimsPreCommon(to, opts); - return writeAllShims(src, to, srcRuntimeInfo, opts); - } - function writeShimsPreCommon(target, opts) { - return opts.fs_.mkdir(path16.dirname(target), { recursive: true }); - } - function writeAllShims(src, to, srcRuntimeInfo, opts) { - const opts_ = ingestOptions(opts); - const generatorAndExts = [{ generator: generateShShim, extension: "" }]; - if (opts_.createCmdFile) { - generatorAndExts.push({ generator: generateCmdShim, extension: CMD_EXTENSION }); - } - if (opts_.createPwshFile) { - generatorAndExts.push({ generator: generatePwshShim, extension: ".ps1" }); - } - return Promise.all(generatorAndExts.map((generatorAndExt) => writeShim(src, to + generatorAndExt.extension, srcRuntimeInfo, generatorAndExt.generator, opts_))); - } - function writeShimPre(target, opts) { - return rm(target, opts); - } - function writeShimPost(target, opts) { - return chmodShim(target, opts); - } - async function searchScriptRuntime(target, opts) { - try { - const data = await opts.fs_.readFile(target, "utf8"); - const firstLine = data.trim().split(/\r*\n/)[0]; - const shebang = firstLine.match(shebangExpr); - if (!shebang) { - const targetExtension = path16.extname(target).toLowerCase(); - return { - // undefined if extension is unknown but it's converted to null. - program: extensionToProgramMap.get(targetExtension) || null, - additionalArgs: "" - }; - } - return { - program: shebang[1], - additionalArgs: shebang[2] - }; - } catch (err) { - if (!isWindows4() || err.code !== "ENOENT") - throw err; - if (await opts.fs_.stat(`${target}${getExeExtension()}`)) { - return { - program: null, - additionalArgs: "" - }; - } - throw err; - } - } - function getExeExtension() { - let cmdExtension; - if (process.env.PATHEXT) { - cmdExtension = process.env.PATHEXT.split(path16.delimiter).find((ext) => ext.toLowerCase() === ".exe"); - } - return cmdExtension || ".exe"; - } - async function writeShim(src, to, srcRuntimeInfo, generateShimScript, opts) { - const defaultArgs = opts.preserveSymlinks ? "--preserve-symlinks" : ""; - const args = [srcRuntimeInfo.additionalArgs, defaultArgs].filter((arg) => arg).join(" "); - opts = Object.assign({}, opts, { - prog: srcRuntimeInfo.program, - args - }); - await writeShimPre(to, opts); - await opts.fs_.writeFile(to, generateShimScript(src, to, opts), "utf8"); - return writeShimPost(to, opts); - } - function generateCmdShim(src, to, opts) { - const shTarget = path16.relative(path16.dirname(to), src); - let target = shTarget.split("/").join("\\"); - const quotedPathToTarget = path16.isAbsolute(target) ? `"${target}"` : `"%~dp0\\${target}"`; - let longProg; - let prog = opts.prog; - let args = opts.args || ""; - const nodePath = normalizePathEnvVar(opts.nodePath).win32; - const prependToPath = normalizePathEnvVar(opts.prependToPath).win32; - if (!prog) { - prog = quotedPathToTarget; - args = ""; - target = ""; - } else if (prog === "node" && opts.nodeExecPath) { - prog = `"${opts.nodeExecPath}"`; - target = quotedPathToTarget; - } else { - longProg = `"%~dp0\\${prog}.exe"`; - target = quotedPathToTarget; - } - let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; - let cmd = "@SETLOCAL\r\n"; - if (prependToPath) { - cmd += `@SET "PATH=${prependToPath}:%PATH%"\r -`; - } - if (nodePath) { - cmd += `@IF NOT DEFINED NODE_PATH (\r - @SET "NODE_PATH=${nodePath}"\r -) ELSE (\r - @SET "NODE_PATH=${nodePath};%NODE_PATH%"\r -)\r -`; - } - if (longProg) { - cmd += `@IF EXIST ${longProg} (\r - ${longProg} ${args} ${target} ${progArgs}%*\r -) ELSE (\r - @SET PATHEXT=%PATHEXT:;.JS;=;%\r - ${prog} ${args} ${target} ${progArgs}%*\r -)\r -`; - } else { - cmd += `@${prog} ${args} ${target} ${progArgs}%*\r -`; - } - return cmd; - } - function generateShShim(src, to, opts) { - let shTarget = path16.relative(path16.dirname(to), src); - let shProg = opts.prog && opts.prog.split("\\").join("/"); - let shLongProg; - shTarget = shTarget.split("\\").join("/"); - const quotedPathToTarget = path16.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; - let args = opts.args || ""; - const shNodePath = normalizePathEnvVar(opts.nodePath).posix; - if (!shProg) { - shProg = quotedPathToTarget; - args = ""; - shTarget = ""; - } else if (opts.prog === "node" && opts.nodeExecPath) { - shProg = `"${opts.nodeExecPath}"`; - shTarget = quotedPathToTarget; - } else { - shLongProg = `"$basedir/${opts.prog}"`; - shTarget = quotedPathToTarget; - } - let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; - let sh = `#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") - -case \`uname\` in - *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; -esac - -`; - if (opts.prependToPath) { - sh += `export PATH="${opts.prependToPath}:$PATH" -`; - } - if (shNodePath) { - sh += `if [ -z "$NODE_PATH" ]; then - export NODE_PATH="${shNodePath}" -else - export NODE_PATH="${shNodePath}:$NODE_PATH" -fi -`; - } - if (shLongProg) { - sh += `if [ -x ${shLongProg} ]; then - exec ${shLongProg} ${args} ${shTarget} ${progArgs}"$@" -else - exec ${shProg} ${args} ${shTarget} ${progArgs}"$@" -fi -`; - } else { - sh += `${shProg} ${args} ${shTarget} ${progArgs}"$@" -exit $? -`; - } - return sh; - } - function generatePwshShim(src, to, opts) { - let shTarget = path16.relative(path16.dirname(to), src); - const shProg = opts.prog && opts.prog.split("\\").join("/"); - let pwshProg = shProg && `"${shProg}$exe"`; - let pwshLongProg; - shTarget = shTarget.split("\\").join("/"); - const quotedPathToTarget = path16.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; - let args = opts.args || ""; - let normalizedNodePathEnvVar = normalizePathEnvVar(opts.nodePath); - const nodePath = normalizedNodePathEnvVar.win32; - const shNodePath = normalizedNodePathEnvVar.posix; - let normalizedPrependPathEnvVar = normalizePathEnvVar(opts.prependToPath); - const prependPath = normalizedPrependPathEnvVar.win32; - const shPrependPath = normalizedPrependPathEnvVar.posix; - if (!pwshProg) { - pwshProg = quotedPathToTarget; - args = ""; - shTarget = ""; - } else if (opts.prog === "node" && opts.nodeExecPath) { - pwshProg = `"${opts.nodeExecPath}"`; - shTarget = quotedPathToTarget; - } else { - pwshLongProg = `"$basedir/${opts.prog}$exe"`; - shTarget = quotedPathToTarget; - } - let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; - let pwsh = `#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -${nodePath || prependPath ? '$pathsep=":"\n' : ""}${nodePath ? `$env_node_path=$env:NODE_PATH -$new_node_path="${nodePath}" -` : ""}${prependPath ? `$env_path=$env:PATH -$prepend_path="${prependPath}" -` : ""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -${nodePath || prependPath ? ' $pathsep=";"\n' : ""}}`; - if (shNodePath || shPrependPath) { - pwsh += ` else { -${shNodePath ? ` $new_node_path="${shNodePath}" -` : ""}${shPrependPath ? ` $prepend_path="${shPrependPath}" -` : ""}} -`; - } - if (shNodePath) { - pwsh += `if ([string]::IsNullOrEmpty($env_node_path)) { - $env:NODE_PATH=$new_node_path -} else { - $env:NODE_PATH="$new_node_path$pathsep$env_node_path" -} -`; - } - if (opts.prependToPath) { - pwsh += ` -$env:PATH="$prepend_path$pathsep$env:PATH" -`; - } - if (pwshLongProg) { - pwsh += ` -$ret=0 -if (Test-Path ${pwshLongProg}) { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & ${pwshLongProg} ${args} ${shTarget} ${progArgs}$args - } else { - & ${pwshLongProg} ${args} ${shTarget} ${progArgs}$args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & ${pwshProg} ${args} ${shTarget} ${progArgs}$args - } else { - & ${pwshProg} ${args} ${shTarget} ${progArgs}$args - } - $ret=$LASTEXITCODE -} -${nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}${prependPath ? "$env:PATH=$env_path\n" : ""}exit $ret -`; - } else { - pwsh += ` -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & ${pwshProg} ${args} ${shTarget} ${progArgs}$args -} else { - & ${pwshProg} ${args} ${shTarget} ${progArgs}$args -} -${nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}${prependPath ? "$env:PATH=$env_path\n" : ""}exit $LASTEXITCODE -`; - } - return pwsh; - } - function chmodShim(to, opts) { - return opts.fs_.chmod(to, 493); - } - function normalizePathEnvVar(nodePath) { - if (!nodePath || !nodePath.length) { - return { - win32: "", - posix: "" - }; - } - let split = typeof nodePath === "string" ? nodePath.split(path16.delimiter) : Array.from(nodePath); - let result = {}; - for (let i = 0; i < split.length; i++) { - const win322 = split[i].split("/").join("\\"); - const posix = isWindows4() ? split[i].split("\\").join("/").replace(/^([^:\\/]*):/, (_, $1) => `/mnt/${$1.toLowerCase()}`) : split[i]; - result.win32 = result.win32 ? `${result.win32};${win322}` : win322; - result.posix = result.posix ? `${result.posix}:${posix}` : posix; - result[i] = { win32: win322, posix }; - } - return result; - } - module2.exports = cmdShim2; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mode-fix.js -var modeFix; -var init_mode_fix = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/mode-fix.js"() { - modeFix = (mode, isDir, portable) => { - mode &= 4095; - if (portable) { - mode = (mode | 384) & ~18; - } - if (isDir) { - if (mode & 256) { - mode |= 64; - } - if (mode & 32) { - mode |= 8; - } - if (mode & 4) { - mode |= 1; - } - } - return mode; - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/write-entry.js -var import_fs11, import_path9, prefixPath, maxReadSize, PROCESS, FILE2, DIRECTORY2, SYMLINK2, HARDLINK2, HEADER, READ2, LSTAT, ONLSTAT, ONREAD, ONREADLINK, OPENFILE, ONOPENFILE, CLOSE, MODE, AWAITDRAIN, ONDRAIN, PREFIX, WriteEntry, WriteEntrySync, WriteEntryTar, getType; -var init_write_entry = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/write-entry.js"() { - import_fs11 = __toESM(require("fs"), 1); - init_esm(); - import_path9 = __toESM(require("path"), 1); - init_header(); - init_mode_fix(); - init_normalize_windows_path(); - init_options(); - init_pax(); - init_strip_absolute_path(); - init_strip_trailing_slashes(); - init_warn_method(); - init_winchars(); - prefixPath = (path16, prefix) => { - if (!prefix) { - return normalizeWindowsPath(path16); - } - path16 = normalizeWindowsPath(path16).replace(/^\.(\/|$)/, ""); - return stripTrailingSlashes(prefix) + "/" + path16; - }; - maxReadSize = 16 * 1024 * 1024; - PROCESS = Symbol("process"); - FILE2 = Symbol("file"); - DIRECTORY2 = Symbol("directory"); - SYMLINK2 = Symbol("symlink"); - HARDLINK2 = Symbol("hardlink"); - HEADER = Symbol("header"); - READ2 = Symbol("read"); - LSTAT = Symbol("lstat"); - ONLSTAT = Symbol("onlstat"); - ONREAD = Symbol("onread"); - ONREADLINK = Symbol("onreadlink"); - OPENFILE = Symbol("openfile"); - ONOPENFILE = Symbol("onopenfile"); - CLOSE = Symbol("close"); - MODE = Symbol("mode"); - AWAITDRAIN = Symbol("awaitDrain"); - ONDRAIN = Symbol("ondrain"); - PREFIX = Symbol("prefix"); - WriteEntry = class extends Minipass { - path; - portable; - myuid = process.getuid && process.getuid() || 0; - // until node has builtin pwnam functions, this'll have to do - myuser = process.env.USER || ""; - maxReadSize; - linkCache; - statCache; - preservePaths; - cwd; - strict; - mtime; - noPax; - noMtime; - prefix; - fd; - blockLen = 0; - blockRemain = 0; - buf; - pos = 0; - remain = 0; - length = 0; - offset = 0; - win32; - absolute; - header; - type; - linkpath; - stat; - onWriteEntry; - #hadError = false; - constructor(p, opt_ = {}) { - const opt = dealias(opt_); - super(); - this.path = normalizeWindowsPath(p); - this.portable = !!opt.portable; - this.maxReadSize = opt.maxReadSize || maxReadSize; - this.linkCache = opt.linkCache || /* @__PURE__ */ new Map(); - this.statCache = opt.statCache || /* @__PURE__ */ new Map(); - this.preservePaths = !!opt.preservePaths; - this.cwd = normalizeWindowsPath(opt.cwd || process.cwd()); - this.strict = !!opt.strict; - this.noPax = !!opt.noPax; - this.noMtime = !!opt.noMtime; - this.mtime = opt.mtime; - this.prefix = opt.prefix ? normalizeWindowsPath(opt.prefix) : void 0; - this.onWriteEntry = opt.onWriteEntry; - if (typeof opt.onwarn === "function") { - this.on("warn", opt.onwarn); - } - let pathWarn = false; - if (!this.preservePaths) { - const [root, stripped] = stripAbsolutePath(this.path); - if (root && typeof stripped === "string") { - this.path = stripped; - pathWarn = root; - } - } - this.win32 = !!opt.win32 || process.platform === "win32"; - if (this.win32) { - this.path = decode(this.path.replace(/\\/g, "/")); - p = p.replace(/\\/g, "/"); - } - this.absolute = normalizeWindowsPath(opt.absolute || import_path9.default.resolve(this.cwd, p)); - if (this.path === "") { - this.path = "./"; - } - if (pathWarn) { - this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, { - entry: this, - path: pathWarn + this.path - }); - } - const cs = this.statCache.get(this.absolute); - if (cs) { - this[ONLSTAT](cs); - } else { - this[LSTAT](); - } - } - warn(code2, message, data = {}) { - return warnMethod(this, code2, message, data); - } - emit(ev, ...data) { - if (ev === "error") { - this.#hadError = true; - } - return super.emit(ev, ...data); - } - [LSTAT]() { - import_fs11.default.lstat(this.absolute, (er, stat) => { - if (er) { - return this.emit("error", er); - } - this[ONLSTAT](stat); - }); - } - [ONLSTAT](stat) { - this.statCache.set(this.absolute, stat); - this.stat = stat; - if (!stat.isFile()) { - stat.size = 0; - } - this.type = getType(stat); - this.emit("stat", stat); - this[PROCESS](); - } - [PROCESS]() { - switch (this.type) { - case "File": - return this[FILE2](); - case "Directory": - return this[DIRECTORY2](); - case "SymbolicLink": - return this[SYMLINK2](); - // unsupported types are ignored. - default: - return this.end(); - } - } - [MODE](mode) { - return modeFix(mode, this.type === "Directory", this.portable); - } - [PREFIX](path16) { - return prefixPath(path16, this.prefix); - } - [HEADER]() { - if (!this.stat) { - throw new Error("cannot write header before stat"); - } - if (this.type === "Directory" && this.portable) { - this.noMtime = true; - } - this.onWriteEntry?.(this); - this.header = new Header({ - path: this[PREFIX](this.path), - // only apply the prefix to hard links. - linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, - // only the permissions and setuid/setgid/sticky bitflags - // not the higher-order bits that specify file type - mode: this[MODE](this.stat.mode), - uid: this.portable ? void 0 : this.stat.uid, - gid: this.portable ? void 0 : this.stat.gid, - size: this.stat.size, - mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, - /* c8 ignore next */ - type: this.type === "Unsupported" ? void 0 : this.type, - uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", - atime: this.portable ? void 0 : this.stat.atime, - ctime: this.portable ? void 0 : this.stat.ctime - }); - if (this.header.encode() && !this.noPax) { - super.write(new Pax({ - atime: this.portable ? void 0 : this.header.atime, - ctime: this.portable ? void 0 : this.header.ctime, - gid: this.portable ? void 0 : this.header.gid, - mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, - path: this[PREFIX](this.path), - linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, - size: this.header.size, - uid: this.portable ? void 0 : this.header.uid, - uname: this.portable ? void 0 : this.header.uname, - dev: this.portable ? void 0 : this.stat.dev, - ino: this.portable ? void 0 : this.stat.ino, - nlink: this.portable ? void 0 : this.stat.nlink - }).encode()); - } - const block = this.header?.block; - if (!block) { - throw new Error("failed to encode header"); - } - super.write(block); - } - [DIRECTORY2]() { - if (!this.stat) { - throw new Error("cannot create directory entry without stat"); - } - if (this.path.slice(-1) !== "/") { - this.path += "/"; - } - this.stat.size = 0; - this[HEADER](); - this.end(); - } - [SYMLINK2]() { - import_fs11.default.readlink(this.absolute, (er, linkpath) => { - if (er) { - return this.emit("error", er); - } - this[ONREADLINK](linkpath); - }); - } - [ONREADLINK](linkpath) { - this.linkpath = normalizeWindowsPath(linkpath); - this[HEADER](); - this.end(); - } - [HARDLINK2](linkpath) { - if (!this.stat) { - throw new Error("cannot create link entry without stat"); - } - this.type = "Link"; - this.linkpath = normalizeWindowsPath(import_path9.default.relative(this.cwd, linkpath)); - this.stat.size = 0; - this[HEADER](); - this.end(); - } - [FILE2]() { - if (!this.stat) { - throw new Error("cannot create file entry without stat"); - } - if (this.stat.nlink > 1) { - const linkKey = `${this.stat.dev}:${this.stat.ino}`; - const linkpath = this.linkCache.get(linkKey); - if (linkpath?.indexOf(this.cwd) === 0) { - return this[HARDLINK2](linkpath); - } - this.linkCache.set(linkKey, this.absolute); - } - this[HEADER](); - if (this.stat.size === 0) { - return this.end(); - } - this[OPENFILE](); - } - [OPENFILE]() { - import_fs11.default.open(this.absolute, "r", (er, fd) => { - if (er) { - return this.emit("error", er); - } - this[ONOPENFILE](fd); - }); - } - [ONOPENFILE](fd) { - this.fd = fd; - if (this.#hadError) { - return this[CLOSE](); - } - if (!this.stat) { - throw new Error("should stat before calling onopenfile"); - } - this.blockLen = 512 * Math.ceil(this.stat.size / 512); - this.blockRemain = this.blockLen; - const bufLen = Math.min(this.blockLen, this.maxReadSize); - this.buf = Buffer.allocUnsafe(bufLen); - this.offset = 0; - this.pos = 0; - this.remain = this.stat.size; - this.length = this.buf.length; - this[READ2](); - } - [READ2]() { - const { fd, buf, offset, length, pos: pos2 } = this; - if (fd === void 0 || buf === void 0) { - throw new Error("cannot read file without first opening"); - } - import_fs11.default.read(fd, buf, offset, length, pos2, (er, bytesRead) => { - if (er) { - return this[CLOSE](() => this.emit("error", er)); - } - this[ONREAD](bytesRead); - }); - } - /* c8 ignore start */ - [CLOSE](cb = () => { - }) { - if (this.fd !== void 0) - import_fs11.default.close(this.fd, cb); - } - [ONREAD](bytesRead) { - if (bytesRead <= 0 && this.remain > 0) { - const er = Object.assign(new Error("encountered unexpected EOF"), { - path: this.absolute, - syscall: "read", - code: "EOF" - }); - return this[CLOSE](() => this.emit("error", er)); - } - if (bytesRead > this.remain) { - const er = Object.assign(new Error("did not encounter expected EOF"), { - path: this.absolute, - syscall: "read", - code: "EOF" - }); - return this[CLOSE](() => this.emit("error", er)); - } - if (!this.buf) { - throw new Error("should have created buffer prior to reading"); - } - if (bytesRead === this.remain) { - for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { - this.buf[i + this.offset] = 0; - bytesRead++; - this.remain++; - } - } - const chunk = this.offset === 0 && bytesRead === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + bytesRead); - const flushed = this.write(chunk); - if (!flushed) { - this[AWAITDRAIN](() => this[ONDRAIN]()); - } else { - this[ONDRAIN](); - } - } - [AWAITDRAIN](cb) { - this.once("drain", cb); - } - write(chunk, encoding, cb) { - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, typeof encoding === "string" ? encoding : "utf8"); - } - if (this.blockRemain < chunk.length) { - const er = Object.assign(new Error("writing more data than expected"), { - path: this.absolute - }); - return this.emit("error", er); - } - this.remain -= chunk.length; - this.blockRemain -= chunk.length; - this.pos += chunk.length; - this.offset += chunk.length; - return super.write(chunk, null, cb); - } - [ONDRAIN]() { - if (!this.remain) { - if (this.blockRemain) { - super.write(Buffer.alloc(this.blockRemain)); - } - return this[CLOSE]((er) => er ? this.emit("error", er) : this.end()); - } - if (!this.buf) { - throw new Error("buffer lost somehow in ONDRAIN"); - } - if (this.offset >= this.length) { - this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); - this.offset = 0; - } - this.length = this.buf.length - this.offset; - this[READ2](); - } - }; - WriteEntrySync = class extends WriteEntry { - sync = true; - [LSTAT]() { - this[ONLSTAT](import_fs11.default.lstatSync(this.absolute)); - } - [SYMLINK2]() { - this[ONREADLINK](import_fs11.default.readlinkSync(this.absolute)); - } - [OPENFILE]() { - this[ONOPENFILE](import_fs11.default.openSync(this.absolute, "r")); - } - [READ2]() { - let threw = true; - try { - const { fd, buf, offset, length, pos: pos2 } = this; - if (fd === void 0 || buf === void 0) { - throw new Error("fd and buf must be set in READ method"); - } - const bytesRead = import_fs11.default.readSync(fd, buf, offset, length, pos2); - this[ONREAD](bytesRead); - threw = false; - } finally { - if (threw) { - try { - this[CLOSE](() => { - }); - } catch (er) { - } - } - } - } - [AWAITDRAIN](cb) { - cb(); - } - /* c8 ignore start */ - [CLOSE](cb = () => { - }) { - if (this.fd !== void 0) - import_fs11.default.closeSync(this.fd); - cb(); - } - }; - WriteEntryTar = class extends Minipass { - blockLen = 0; - blockRemain = 0; - buf = 0; - pos = 0; - remain = 0; - length = 0; - preservePaths; - portable; - strict; - noPax; - noMtime; - readEntry; - type; - prefix; - path; - mode; - uid; - gid; - uname; - gname; - header; - mtime; - atime; - ctime; - linkpath; - size; - onWriteEntry; - warn(code2, message, data = {}) { - return warnMethod(this, code2, message, data); - } - constructor(readEntry, opt_ = {}) { - const opt = dealias(opt_); - super(); - this.preservePaths = !!opt.preservePaths; - this.portable = !!opt.portable; - this.strict = !!opt.strict; - this.noPax = !!opt.noPax; - this.noMtime = !!opt.noMtime; - this.onWriteEntry = opt.onWriteEntry; - this.readEntry = readEntry; - const { type } = readEntry; - if (type === "Unsupported") { - throw new Error("writing entry that should be ignored"); - } - this.type = type; - if (this.type === "Directory" && this.portable) { - this.noMtime = true; - } - this.prefix = opt.prefix; - this.path = normalizeWindowsPath(readEntry.path); - this.mode = readEntry.mode !== void 0 ? this[MODE](readEntry.mode) : void 0; - this.uid = this.portable ? void 0 : readEntry.uid; - this.gid = this.portable ? void 0 : readEntry.gid; - this.uname = this.portable ? void 0 : readEntry.uname; - this.gname = this.portable ? void 0 : readEntry.gname; - this.size = readEntry.size; - this.mtime = this.noMtime ? void 0 : opt.mtime || readEntry.mtime; - this.atime = this.portable ? void 0 : readEntry.atime; - this.ctime = this.portable ? void 0 : readEntry.ctime; - this.linkpath = readEntry.linkpath !== void 0 ? normalizeWindowsPath(readEntry.linkpath) : void 0; - if (typeof opt.onwarn === "function") { - this.on("warn", opt.onwarn); - } - let pathWarn = false; - if (!this.preservePaths) { - const [root, stripped] = stripAbsolutePath(this.path); - if (root && typeof stripped === "string") { - this.path = stripped; - pathWarn = root; - } - } - this.remain = readEntry.size; - this.blockRemain = readEntry.startBlockSize; - this.onWriteEntry?.(this); - this.header = new Header({ - path: this[PREFIX](this.path), - linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, - // only the permissions and setuid/setgid/sticky bitflags - // not the higher-order bits that specify file type - mode: this.mode, - uid: this.portable ? void 0 : this.uid, - gid: this.portable ? void 0 : this.gid, - size: this.size, - mtime: this.noMtime ? void 0 : this.mtime, - type: this.type, - uname: this.portable ? void 0 : this.uname, - atime: this.portable ? void 0 : this.atime, - ctime: this.portable ? void 0 : this.ctime - }); - if (pathWarn) { - this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, { - entry: this, - path: pathWarn + this.path - }); - } - if (this.header.encode() && !this.noPax) { - super.write(new Pax({ - atime: this.portable ? void 0 : this.atime, - ctime: this.portable ? void 0 : this.ctime, - gid: this.portable ? void 0 : this.gid, - mtime: this.noMtime ? void 0 : this.mtime, - path: this[PREFIX](this.path), - linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[PREFIX](this.linkpath) : this.linkpath, - size: this.size, - uid: this.portable ? void 0 : this.uid, - uname: this.portable ? void 0 : this.uname, - dev: this.portable ? void 0 : this.readEntry.dev, - ino: this.portable ? void 0 : this.readEntry.ino, - nlink: this.portable ? void 0 : this.readEntry.nlink - }).encode()); - } - const b = this.header?.block; - if (!b) - throw new Error("failed to encode header"); - super.write(b); - readEntry.pipe(this); - } - [PREFIX](path16) { - return prefixPath(path16, this.prefix); - } - [MODE](mode) { - return modeFix(mode, this.type === "Directory", this.portable); - } - write(chunk, encoding, cb) { - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, typeof encoding === "string" ? encoding : "utf8"); - } - const writeLen = chunk.length; - if (writeLen > this.blockRemain) { - throw new Error("writing more to entry than is appropriate"); - } - this.blockRemain -= writeLen; - return super.write(chunk, cb); - } - end(chunk, encoding, cb) { - if (this.blockRemain) { - super.write(Buffer.alloc(this.blockRemain)); - } - if (typeof chunk === "function") { - cb = chunk; - encoding = void 0; - chunk = void 0; - } - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding ?? "utf8"); - } - if (cb) - this.once("finish", cb); - chunk ? super.end(chunk, cb) : super.end(cb); - return this; - } - }; - getType = (stat) => stat.isFile() ? "File" : stat.isDirectory() ? "Directory" : stat.isSymbolicLink() ? "SymbolicLink" : "Unsupported"; - } -}); - -// .yarn/cache/yallist-npm-5.0.0-8732dd9f1c-a499c81ce6.zip/node_modules/yallist/dist/esm/index.js -function insertAfter(self2, node, value) { - const prev = node; - const next = node ? node.next : self2.head; - const inserted = new Node(value, prev, next, self2); - if (inserted.next === void 0) { - self2.tail = inserted; - } - if (inserted.prev === void 0) { - self2.head = inserted; - } - self2.length++; - return inserted; -} -function push(self2, item) { - self2.tail = new Node(item, self2.tail, void 0, self2); - if (!self2.head) { - self2.head = self2.tail; - } - self2.length++; -} -function unshift(self2, item) { - self2.head = new Node(item, void 0, self2.head, self2); - if (!self2.tail) { - self2.tail = self2.head; - } - self2.length++; -} -var Yallist, Node; -var init_esm5 = __esm({ - ".yarn/cache/yallist-npm-5.0.0-8732dd9f1c-a499c81ce6.zip/node_modules/yallist/dist/esm/index.js"() { - Yallist = class _Yallist { - tail; - head; - length = 0; - static create(list2 = []) { - return new _Yallist(list2); - } - constructor(list2 = []) { - for (const item of list2) { - this.push(item); - } - } - *[Symbol.iterator]() { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - } - removeNode(node) { - if (node.list !== this) { - throw new Error("removing node which does not belong to this list"); - } - const next = node.next; - const prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - this.length--; - node.next = void 0; - node.prev = void 0; - node.list = void 0; - return next; - } - unshiftNode(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - const head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - } - pushNode(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - const tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - } - push(...args) { - for (let i = 0, l = args.length; i < l; i++) { - push(this, args[i]); - } - return this.length; - } - unshift(...args) { - for (var i = 0, l = args.length; i < l; i++) { - unshift(this, args[i]); - } - return this.length; - } - pop() { - if (!this.tail) { - return void 0; - } - const res = this.tail.value; - const t = this.tail; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = void 0; - } else { - this.head = void 0; - } - t.list = void 0; - this.length--; - return res; - } - shift() { - if (!this.head) { - return void 0; - } - const res = this.head.value; - const h = this.head; - this.head = this.head.next; - if (this.head) { - this.head.prev = void 0; - } else { - this.tail = void 0; - } - h.list = void 0; - this.length--; - return res; - } - forEach(fn2, thisp) { - thisp = thisp || this; - for (let walker = this.head, i = 0; !!walker; i++) { - fn2.call(thisp, walker.value, i, this); - walker = walker.next; - } - } - forEachReverse(fn2, thisp) { - thisp = thisp || this; - for (let walker = this.tail, i = this.length - 1; !!walker; i--) { - fn2.call(thisp, walker.value, i, this); - walker = walker.prev; - } - } - get(n) { - let i = 0; - let walker = this.head; - for (; !!walker && i < n; i++) { - walker = walker.next; - } - if (i === n && !!walker) { - return walker.value; - } - } - getReverse(n) { - let i = 0; - let walker = this.tail; - for (; !!walker && i < n; i++) { - walker = walker.prev; - } - if (i === n && !!walker) { - return walker.value; - } - } - map(fn2, thisp) { - thisp = thisp || this; - const res = new _Yallist(); - for (let walker = this.head; !!walker; ) { - res.push(fn2.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - } - mapReverse(fn2, thisp) { - thisp = thisp || this; - var res = new _Yallist(); - for (let walker = this.tail; !!walker; ) { - res.push(fn2.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - } - reduce(fn2, initial) { - let acc; - let walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = 0; !!walker; i++) { - acc = fn2(acc, walker.value, i); - walker = walker.next; - } - return acc; - } - reduceReverse(fn2, initial) { - let acc; - let walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (let i = this.length - 1; !!walker; i--) { - acc = fn2(acc, walker.value, i); - walker = walker.prev; - } - return acc; - } - toArray() { - const arr = new Array(this.length); - for (let i = 0, walker = this.head; !!walker; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - } - toArrayReverse() { - const arr = new Array(this.length); - for (let i = 0, walker = this.tail; !!walker; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - } - slice(from = 0, to = this.length) { - if (to < 0) { - to += this.length; - } - if (from < 0) { - from += this.length; - } - const ret = new _Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - let walker = this.head; - let i = 0; - for (i = 0; !!walker && i < from; i++) { - walker = walker.next; - } - for (; !!walker && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - } - sliceReverse(from = 0, to = this.length) { - if (to < 0) { - to += this.length; - } - if (from < 0) { - from += this.length; - } - const ret = new _Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - let i = this.length; - let walker = this.tail; - for (; !!walker && i > to; i--) { - walker = walker.prev; - } - for (; !!walker && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - } - splice(start, deleteCount = 0, ...nodes) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - let walker = this.head; - for (let i = 0; !!walker && i < start; i++) { - walker = walker.next; - } - const ret = []; - for (let i = 0; !!walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (!walker) { - walker = this.tail; - } else if (walker !== this.tail) { - walker = walker.prev; - } - for (const v of nodes) { - walker = insertAfter(this, walker, v); - } - return ret; - } - reverse() { - const head = this.head; - const tail = this.tail; - for (let walker = head; !!walker; walker = walker.prev) { - const p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - } - }; - Node = class { - list; - next; - prev; - value; - constructor(value, prev, next, list2) { - this.list = list2; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = void 0; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = void 0; - } - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pack.js -var import_fs12, import_path10, PackJob, EOF2, ONSTAT, ENDED3, QUEUE2, CURRENT, PROCESS2, PROCESSING, PROCESSJOB, JOBS, JOBDONE, ADDFSENTRY, ADDTARENTRY, STAT, READDIR, ONREADDIR, PIPE, ENTRY, ENTRYOPT, WRITEENTRYCLASS, WRITE, ONDRAIN2, Pack, PackSync; -var init_pack = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/pack.js"() { - import_fs12 = __toESM(require("fs"), 1); - init_write_entry(); - init_esm(); - init_esm3(); - init_esm5(); - init_read_entry(); - init_warn_method(); - import_path10 = __toESM(require("path"), 1); - init_normalize_windows_path(); - PackJob = class { - path; - absolute; - entry; - stat; - readdir; - pending = false; - ignore = false; - piped = false; - constructor(path16, absolute) { - this.path = path16 || "./"; - this.absolute = absolute; - } - }; - EOF2 = Buffer.alloc(1024); - ONSTAT = Symbol("onStat"); - ENDED3 = Symbol("ended"); - QUEUE2 = Symbol("queue"); - CURRENT = Symbol("current"); - PROCESS2 = Symbol("process"); - PROCESSING = Symbol("processing"); - PROCESSJOB = Symbol("processJob"); - JOBS = Symbol("jobs"); - JOBDONE = Symbol("jobDone"); - ADDFSENTRY = Symbol("addFSEntry"); - ADDTARENTRY = Symbol("addTarEntry"); - STAT = Symbol("stat"); - READDIR = Symbol("readdir"); - ONREADDIR = Symbol("onreaddir"); - PIPE = Symbol("pipe"); - ENTRY = Symbol("entry"); - ENTRYOPT = Symbol("entryOpt"); - WRITEENTRYCLASS = Symbol("writeEntryClass"); - WRITE = Symbol("write"); - ONDRAIN2 = Symbol("ondrain"); - Pack = class extends Minipass { - opt; - cwd; - maxReadSize; - preservePaths; - strict; - noPax; - prefix; - linkCache; - statCache; - file; - portable; - zip; - readdirCache; - noDirRecurse; - follow; - noMtime; - mtime; - filter; - jobs; - [WRITEENTRYCLASS]; - onWriteEntry; - // Note: we actually DO need a linked list here, because we - // shift() to update the head of the list where we start, but still - // while that happens, need to know what the next item in the queue - // will be. Since we do multiple jobs in parallel, it's not as simple - // as just an Array.shift(), since that would lose the information about - // the next job in the list. We could add a .next field on the PackJob - // class, but then we'd have to be tracking the tail of the queue the - // whole time, and Yallist just does that for us anyway. - [QUEUE2]; - [JOBS] = 0; - [PROCESSING] = false; - [ENDED3] = false; - constructor(opt = {}) { - super(); - this.opt = opt; - this.file = opt.file || ""; - this.cwd = opt.cwd || process.cwd(); - this.maxReadSize = opt.maxReadSize; - this.preservePaths = !!opt.preservePaths; - this.strict = !!opt.strict; - this.noPax = !!opt.noPax; - this.prefix = normalizeWindowsPath(opt.prefix || ""); - this.linkCache = opt.linkCache || /* @__PURE__ */ new Map(); - this.statCache = opt.statCache || /* @__PURE__ */ new Map(); - this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map(); - this.onWriteEntry = opt.onWriteEntry; - this[WRITEENTRYCLASS] = WriteEntry; - if (typeof opt.onwarn === "function") { - this.on("warn", opt.onwarn); - } - this.portable = !!opt.portable; - if (opt.gzip || opt.brotli || opt.zstd) { - if ((opt.gzip ? 1 : 0) + (opt.brotli ? 1 : 0) + (opt.zstd ? 1 : 0) > 1) { - throw new TypeError("gzip, brotli, zstd are mutually exclusive"); - } - if (opt.gzip) { - if (typeof opt.gzip !== "object") { - opt.gzip = {}; - } - if (this.portable) { - opt.gzip.portable = true; - } - this.zip = new Gzip(opt.gzip); - } - if (opt.brotli) { - if (typeof opt.brotli !== "object") { - opt.brotli = {}; - } - this.zip = new BrotliCompress(opt.brotli); - } - if (opt.zstd) { - if (typeof opt.zstd !== "object") { - opt.zstd = {}; - } - this.zip = new ZstdCompress(opt.zstd); - } - if (!this.zip) - throw new Error("impossible"); - const zip = this.zip; - zip.on("data", (chunk) => super.write(chunk)); - zip.on("end", () => super.end()); - zip.on("drain", () => this[ONDRAIN2]()); - this.on("resume", () => zip.resume()); - } else { - this.on("drain", this[ONDRAIN2]); - } - this.noDirRecurse = !!opt.noDirRecurse; - this.follow = !!opt.follow; - this.noMtime = !!opt.noMtime; - if (opt.mtime) - this.mtime = opt.mtime; - this.filter = typeof opt.filter === "function" ? opt.filter : () => true; - this[QUEUE2] = new Yallist(); - this[JOBS] = 0; - this.jobs = Number(opt.jobs) || 4; - this[PROCESSING] = false; - this[ENDED3] = false; - } - [WRITE](chunk) { - return super.write(chunk); - } - add(path16) { - this.write(path16); - return this; - } - end(path16, encoding, cb) { - if (typeof path16 === "function") { - cb = path16; - path16 = void 0; - } - if (typeof encoding === "function") { - cb = encoding; - encoding = void 0; - } - if (path16) { - this.add(path16); - } - this[ENDED3] = true; - this[PROCESS2](); - if (cb) - cb(); - return this; - } - write(path16) { - if (this[ENDED3]) { - throw new Error("write after end"); - } - if (path16 instanceof ReadEntry) { - this[ADDTARENTRY](path16); - } else { - this[ADDFSENTRY](path16); - } - return this.flowing; - } - [ADDTARENTRY](p) { - const absolute = normalizeWindowsPath(import_path10.default.resolve(this.cwd, p.path)); - if (!this.filter(p.path, p)) { - p.resume(); - } else { - const job = new PackJob(p.path, absolute); - job.entry = new WriteEntryTar(p, this[ENTRYOPT](job)); - job.entry.on("end", () => this[JOBDONE](job)); - this[JOBS] += 1; - this[QUEUE2].push(job); - } - this[PROCESS2](); - } - [ADDFSENTRY](p) { - const absolute = normalizeWindowsPath(import_path10.default.resolve(this.cwd, p)); - this[QUEUE2].push(new PackJob(p, absolute)); - this[PROCESS2](); - } - [STAT](job) { - job.pending = true; - this[JOBS] += 1; - const stat = this.follow ? "stat" : "lstat"; - import_fs12.default[stat](job.absolute, (er, stat2) => { - job.pending = false; - this[JOBS] -= 1; - if (er) { - this.emit("error", er); - } else { - this[ONSTAT](job, stat2); - } - }); - } - [ONSTAT](job, stat) { - this.statCache.set(job.absolute, stat); - job.stat = stat; - if (!this.filter(job.path, stat)) { - job.ignore = true; - } - this[PROCESS2](); - } - [READDIR](job) { - job.pending = true; - this[JOBS] += 1; - import_fs12.default.readdir(job.absolute, (er, entries) => { - job.pending = false; - this[JOBS] -= 1; - if (er) { - return this.emit("error", er); - } - this[ONREADDIR](job, entries); - }); - } - [ONREADDIR](job, entries) { - this.readdirCache.set(job.absolute, entries); - job.readdir = entries; - this[PROCESS2](); - } - [PROCESS2]() { - if (this[PROCESSING]) { - return; - } - this[PROCESSING] = true; - for (let w = this[QUEUE2].head; !!w && this[JOBS] < this.jobs; w = w.next) { - this[PROCESSJOB](w.value); - if (w.value.ignore) { - const p = w.next; - this[QUEUE2].removeNode(w); - w.next = p; - } - } - this[PROCESSING] = false; - if (this[ENDED3] && !this[QUEUE2].length && this[JOBS] === 0) { - if (this.zip) { - this.zip.end(EOF2); - } else { - super.write(EOF2); - super.end(); - } - } - } - get [CURRENT]() { - return this[QUEUE2] && this[QUEUE2].head && this[QUEUE2].head.value; - } - [JOBDONE](_job) { - this[QUEUE2].shift(); - this[JOBS] -= 1; - this[PROCESS2](); - } - [PROCESSJOB](job) { - if (job.pending) { - return; - } - if (job.entry) { - if (job === this[CURRENT] && !job.piped) { - this[PIPE](job); - } - return; - } - if (!job.stat) { - const sc = this.statCache.get(job.absolute); - if (sc) { - this[ONSTAT](job, sc); - } else { - this[STAT](job); - } - } - if (!job.stat) { - return; - } - if (job.ignore) { - return; - } - if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) { - const rc = this.readdirCache.get(job.absolute); - if (rc) { - this[ONREADDIR](job, rc); - } else { - this[READDIR](job); - } - if (!job.readdir) { - return; - } - } - job.entry = this[ENTRY](job); - if (!job.entry) { - job.ignore = true; - return; - } - if (job === this[CURRENT] && !job.piped) { - this[PIPE](job); - } - } - [ENTRYOPT](job) { - return { - onwarn: (code2, msg, data) => this.warn(code2, msg, data), - noPax: this.noPax, - cwd: this.cwd, - absolute: job.absolute, - preservePaths: this.preservePaths, - maxReadSize: this.maxReadSize, - strict: this.strict, - portable: this.portable, - linkCache: this.linkCache, - statCache: this.statCache, - noMtime: this.noMtime, - mtime: this.mtime, - prefix: this.prefix, - onWriteEntry: this.onWriteEntry - }; - } - [ENTRY](job) { - this[JOBS] += 1; - try { - const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); - return e.on("end", () => this[JOBDONE](job)).on("error", (er) => this.emit("error", er)); - } catch (er) { - this.emit("error", er); - } - } - [ONDRAIN2]() { - if (this[CURRENT] && this[CURRENT].entry) { - this[CURRENT].entry.resume(); - } - } - // like .pipe() but using super, because our write() is special - [PIPE](job) { - job.piped = true; - if (job.readdir) { - job.readdir.forEach((entry) => { - const p = job.path; - const base = p === "./" ? "" : p.replace(/\/*$/, "/"); - this[ADDFSENTRY](base + entry); - }); - } - const source = job.entry; - const zip = this.zip; - if (!source) - throw new Error("cannot pipe without source"); - if (zip) { - source.on("data", (chunk) => { - if (!zip.write(chunk)) { - source.pause(); - } - }); - } else { - source.on("data", (chunk) => { - if (!super.write(chunk)) { - source.pause(); - } - }); - } - } - pause() { - if (this.zip) { - this.zip.pause(); - } - return super.pause(); - } - warn(code2, message, data = {}) { - warnMethod(this, code2, message, data); - } - }; - PackSync = class extends Pack { - sync = true; - constructor(opt) { - super(opt); - this[WRITEENTRYCLASS] = WriteEntrySync; - } - // pause/resume are no-ops in sync streams. - pause() { - } - resume() { - } - [STAT](job) { - const stat = this.follow ? "statSync" : "lstatSync"; - this[ONSTAT](job, import_fs12.default[stat](job.absolute)); - } - [READDIR](job) { - this[ONREADDIR](job, import_fs12.default.readdirSync(job.absolute)); - } - // gotta get it all in this tick - [PIPE](job) { - const source = job.entry; - const zip = this.zip; - if (job.readdir) { - job.readdir.forEach((entry) => { - const p = job.path; - const base = p === "./" ? "" : p.replace(/\/*$/, "/"); - this[ADDFSENTRY](base + entry); - }); - } - if (!source) - throw new Error("Cannot pipe without source"); - if (zip) { - source.on("data", (chunk) => { - zip.write(chunk); - }); - } else { - source.on("data", (chunk) => { - super[WRITE](chunk); - }); - } - } - }; - } -}); - -// .yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/create.js -var create_exports = {}; -__export(create_exports, { - create: () => create -}); -var import_node_path8, createFileSync, createFile, addFilesSync, addFilesAsync, createSync, createAsync, create; -var init_create = __esm({ - ".yarn/cache/tar-npm-7.5.2-6d8cfb7a13-a7d8b80113.zip/node_modules/tar/dist/esm/create.js"() { - init_esm2(); - import_node_path8 = __toESM(require("node:path"), 1); - init_list(); - init_make_command(); - init_pack(); - createFileSync = (opt, files) => { - const p = new PackSync(opt); - const stream = new WriteStreamSync(opt.file, { - mode: opt.mode || 438 - }); - p.pipe(stream); - addFilesSync(p, files); - }; - createFile = (opt, files) => { - const p = new Pack(opt); - const stream = new WriteStream(opt.file, { - mode: opt.mode || 438 - }); - p.pipe(stream); - const promise = new Promise((res, rej) => { - stream.on("error", rej); - stream.on("close", res); - p.on("error", rej); - }); - addFilesAsync(p, files); - return promise; - }; - addFilesSync = (p, files) => { - files.forEach((file) => { - if (file.charAt(0) === "@") { - list({ - file: import_node_path8.default.resolve(p.cwd, file.slice(1)), - sync: true, - noResume: true, - onReadEntry: (entry) => p.add(entry) - }); - } else { - p.add(file); - } - }); - p.end(); - }; - addFilesAsync = async (p, files) => { - for (let i = 0; i < files.length; i++) { - const file = String(files[i]); - if (file.charAt(0) === "@") { - await list({ - file: import_node_path8.default.resolve(String(p.cwd), file.slice(1)), - noResume: true, - onReadEntry: (entry) => { - p.add(entry); - } - }); - } else { - p.add(file); - } - } - p.end(); - }; - createSync = (opt, files) => { - const p = new PackSync(opt); - addFilesSync(p, files); - return p; - }; - createAsync = (opt, files) => { - const p = new Pack(opt); - addFilesAsync(p, files); - return p; - }; - create = makeCommand(createFileSync, createFile, createSync, createAsync, (_opt, files) => { - if (!files?.length) { - throw new TypeError("no paths specified to add to archive"); - } - }); - } -}); - -// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/major.js -var require_major = __commonJS({ - ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/functions/major.js"(exports2, module2) { - "use strict"; - var SemVer3 = require_semver(); - var major = (a, loose) => new SemVer3(a, loose).major; - module2.exports = major; - } -}); - -// sources/_lib.ts -var lib_exports2 = {}; -__export(lib_exports2, { - runMain: () => runMain -}); -module.exports = __toCommonJS(lib_exports2); - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/constants.mjs -var NODE_INITIAL = 0; -var NODE_SUCCESS = 1; -var NODE_ERRORED = 2; -var START_OF_INPUT = ``; -var END_OF_INPUT = `\0`; -var HELP_COMMAND_INDEX = -1; -var HELP_REGEX = /^(-h|--help)(?:=([0-9]+))?$/; -var OPTION_REGEX = /^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/; -var BATCH_REGEX = /^-[a-zA-Z]{2,}$/; -var BINDING_REGEX = /^([^=]+)=([\s\S]*)$/; -var DEBUG = process.env.DEBUG_CLI === `1`; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/errors.mjs -var UsageError = class extends Error { - constructor(message) { - super(message); - this.clipanion = { type: `usage` }; - this.name = `UsageError`; - } -}; -var UnknownSyntaxError = class extends Error { - constructor(input, candidates) { - super(); - this.input = input; - this.candidates = candidates; - this.clipanion = { type: `none` }; - this.name = `UnknownSyntaxError`; - if (this.candidates.length === 0) { - this.message = `Command not found, but we're not sure what's the alternative.`; - } else if (this.candidates.every((candidate) => candidate.reason !== null && candidate.reason === candidates[0].reason)) { - const [{ reason }] = this.candidates; - this.message = `${reason} - -${this.candidates.map(({ usage }) => `$ ${usage}`).join(` -`)}`; - } else if (this.candidates.length === 1) { - const [{ usage }] = this.candidates; - this.message = `Command not found; did you mean: - -$ ${usage} -${whileRunning(input)}`; - } else { - this.message = `Command not found; did you mean one of: - -${this.candidates.map(({ usage }, index) => { - return `${`${index}.`.padStart(4)} ${usage}`; - }).join(` -`)} - -${whileRunning(input)}`; - } - } -}; -var AmbiguousSyntaxError = class extends Error { - constructor(input, usages) { - super(); - this.input = input; - this.usages = usages; - this.clipanion = { type: `none` }; - this.name = `AmbiguousSyntaxError`; - this.message = `Cannot find which to pick amongst the following alternatives: - -${this.usages.map((usage, index) => { - return `${`${index}.`.padStart(4)} ${usage}`; - }).join(` -`)} - -${whileRunning(input)}`; - } -}; -var whileRunning = (input) => `While running ${input.filter((token) => { - return token !== END_OF_INPUT; -}).map((token) => { - const json = JSON.stringify(token); - if (token.match(/\s/) || token.length === 0 || json !== `"${token}"`) { - return json; - } else { - return token; - } -}).join(` `)}`; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/format.mjs -var MAX_LINE_LENGTH = 80; -var richLine = Array(MAX_LINE_LENGTH).fill(`\u2501`); -for (let t = 0; t <= 24; ++t) - richLine[richLine.length - t] = `\x1B[38;5;${232 + t}m\u2501`; -var richFormat = { - header: (str) => `\x1B[1m\u2501\u2501\u2501 ${str}${str.length < MAX_LINE_LENGTH - 5 ? ` ${richLine.slice(str.length + 5).join(``)}` : `:`}\x1B[0m`, - bold: (str) => `\x1B[1m${str}\x1B[22m`, - error: (str) => `\x1B[31m\x1B[1m${str}\x1B[22m\x1B[39m`, - code: (str) => `\x1B[36m${str}\x1B[39m` -}; -var textFormat = { - header: (str) => str, - bold: (str) => str, - error: (str) => str, - code: (str) => str -}; -function dedent(text) { - const lines = text.split(` -`); - const nonEmptyLines = lines.filter((line) => line.match(/\S/)); - const indent = nonEmptyLines.length > 0 ? nonEmptyLines.reduce((minLength, line) => Math.min(minLength, line.length - line.trimStart().length), Number.MAX_VALUE) : 0; - return lines.map((line) => line.slice(indent).trimRight()).join(` -`); -} -function formatMarkdownish(text, { format, paragraphs }) { - text = text.replace(/\r\n?/g, ` -`); - text = dedent(text); - text = text.replace(/^\n+|\n+$/g, ``); - text = text.replace(/^(\s*)-([^\n]*?)\n+/gm, `$1-$2 - -`); - text = text.replace(/\n(\n)?\n*/g, ($0, $1) => $1 ? $1 : ` `); - if (paragraphs) { - text = text.split(/\n/).map((paragraph) => { - const bulletMatch = paragraph.match(/^\s*[*-][\t ]+(.*)/); - if (!bulletMatch) - return paragraph.match(/(.{1,80})(?: |$)/g).join(` -`); - const indent = paragraph.length - paragraph.trimStart().length; - return bulletMatch[1].match(new RegExp(`(.{1,${78 - indent}})(?: |$)`, `g`)).map((line, index) => { - return ` `.repeat(indent) + (index === 0 ? `- ` : ` `) + line; - }).join(` -`); - }).join(` - -`); - } - text = text.replace(/(`+)((?:.|[\n])*?)\1/g, ($0, $1, $2) => { - return format.code($1 + $2 + $1); - }); - text = text.replace(/(\*\*)((?:.|[\n])*?)\1/g, ($0, $1, $2) => { - return format.bold($1 + $2 + $1); - }); - return text ? `${text} -` : ``; -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/utils.mjs -var isOptionSymbol = Symbol(`clipanion/isOption`); -function makeCommandOption(spec) { - return { ...spec, [isOptionSymbol]: true }; -} -function rerouteArguments(a, b) { - if (typeof a === `undefined`) - return [a, b]; - if (typeof a === `object` && a !== null && !Array.isArray(a)) { - return [void 0, a]; - } else { - return [a, b]; - } -} -function cleanValidationError(message, { mergeName = false } = {}) { - const match = message.match(/^([^:]+): (.*)$/m); - if (!match) - return `validation failed`; - let [, path16, line] = match; - if (mergeName) - line = line[0].toLowerCase() + line.slice(1); - line = path16 !== `.` || !mergeName ? `${path16.replace(/^\.(\[|$)/, `$1`)}: ${line}` : `: ${line}`; - return line; -} -function formatError(message, errors) { - if (errors.length === 1) { - return new UsageError(`${message}${cleanValidationError(errors[0], { mergeName: true })}`); - } else { - return new UsageError(`${message}: -${errors.map((error) => ` -- ${cleanValidationError(error)}`).join(``)}`); - } -} -function applyValidator(name2, value, validator) { - if (typeof validator === `undefined`) - return value; - const errors = []; - const coercions = []; - const coercion = (v) => { - const orig = value; - value = v; - return coercion.bind(null, orig); - }; - const check = validator(value, { errors, coercions, coercion }); - if (!check) - throw formatError(`Invalid value for ${name2}`, errors); - for (const [, op] of coercions) - op(); - return value; -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/Command.mjs -var Command = class { - constructor() { - this.help = false; - } - /** - * Defines the usage information for the given command. - */ - static Usage(usage) { - return usage; - } - /** - * Standard error handler which will simply rethrow the error. Can be used - * to add custom logic to handle errors from the command or simply return - * the parent class error handling. - */ - async catch(error) { - throw error; - } - async validateAndExecute() { - const commandClass = this.constructor; - const cascade2 = commandClass.schema; - if (Array.isArray(cascade2)) { - const { isDict: isDict2, isUnknown: isUnknown2, applyCascade: applyCascade2 } = await Promise.resolve().then(() => (init_lib(), lib_exports)); - const schema = applyCascade2(isDict2(isUnknown2()), cascade2); - const errors = []; - const coercions = []; - const check = schema(this, { errors, coercions }); - if (!check) - throw formatError(`Invalid option schema`, errors); - for (const [, op] of coercions) { - op(); - } - } else if (cascade2 != null) { - throw new Error(`Invalid command schema`); - } - const exitCode = await this.execute(); - if (typeof exitCode !== `undefined`) { - return exitCode; - } else { - return 0; - } - } -}; -Command.isOption = isOptionSymbol; -Command.Default = []; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/core.mjs -function debug(str) { - if (DEBUG) { - console.log(str); - } -} -var basicHelpState = { - candidateUsage: null, - requiredOptions: [], - errorMessage: null, - ignoreOptions: false, - path: [], - positionals: [], - options: [], - remainder: null, - selectedIndex: HELP_COMMAND_INDEX -}; -function makeStateMachine() { - return { - nodes: [makeNode(), makeNode(), makeNode()] - }; -} -function makeAnyOfMachine(inputs) { - const output = makeStateMachine(); - const heads = []; - let offset = output.nodes.length; - for (const input of inputs) { - heads.push(offset); - for (let t = 0; t < input.nodes.length; ++t) - if (!isTerminalNode(t)) - output.nodes.push(cloneNode(input.nodes[t], offset)); - offset += input.nodes.length - 2; - } - for (const head of heads) - registerShortcut(output, NODE_INITIAL, head); - return output; -} -function injectNode(machine, node) { - machine.nodes.push(node); - return machine.nodes.length - 1; -} -function simplifyMachine(input) { - const visited = /* @__PURE__ */ new Set(); - const process5 = (node) => { - if (visited.has(node)) - return; - visited.add(node); - const nodeDef = input.nodes[node]; - for (const transitions of Object.values(nodeDef.statics)) - for (const { to } of transitions) - process5(to); - for (const [, { to }] of nodeDef.dynamics) - process5(to); - for (const { to } of nodeDef.shortcuts) - process5(to); - const shortcuts = new Set(nodeDef.shortcuts.map(({ to }) => to)); - while (nodeDef.shortcuts.length > 0) { - const { to } = nodeDef.shortcuts.shift(); - const toDef = input.nodes[to]; - for (const [segment, transitions] of Object.entries(toDef.statics)) { - const store = !Object.prototype.hasOwnProperty.call(nodeDef.statics, segment) ? nodeDef.statics[segment] = [] : nodeDef.statics[segment]; - for (const transition of transitions) { - if (!store.some(({ to: to2 }) => transition.to === to2)) { - store.push(transition); - } - } - } - for (const [test, transition] of toDef.dynamics) - if (!nodeDef.dynamics.some(([otherTest, { to: to2 }]) => test === otherTest && transition.to === to2)) - nodeDef.dynamics.push([test, transition]); - for (const transition of toDef.shortcuts) { - if (!shortcuts.has(transition.to)) { - nodeDef.shortcuts.push(transition); - shortcuts.add(transition.to); - } - } - } - }; - process5(NODE_INITIAL); -} -function debugMachine(machine, { prefix = `` } = {}) { - if (DEBUG) { - debug(`${prefix}Nodes are:`); - for (let t = 0; t < machine.nodes.length; ++t) { - debug(`${prefix} ${t}: ${JSON.stringify(machine.nodes[t])}`); - } - } -} -function runMachineInternal(machine, input, partial = false) { - debug(`Running a vm on ${JSON.stringify(input)}`); - let branches = [{ node: NODE_INITIAL, state: { - candidateUsage: null, - requiredOptions: [], - errorMessage: null, - ignoreOptions: false, - options: [], - path: [], - positionals: [], - remainder: null, - selectedIndex: null - } }]; - debugMachine(machine, { prefix: ` ` }); - const tokens = [START_OF_INPUT, ...input]; - for (let t = 0; t < tokens.length; ++t) { - const segment = tokens[t]; - debug(` Processing ${JSON.stringify(segment)}`); - const nextBranches = []; - for (const { node, state } of branches) { - debug(` Current node is ${node}`); - const nodeDef = machine.nodes[node]; - if (node === NODE_ERRORED) { - nextBranches.push({ node, state }); - continue; - } - console.assert(nodeDef.shortcuts.length === 0, `Shortcuts should have been eliminated by now`); - const hasExactMatch = Object.prototype.hasOwnProperty.call(nodeDef.statics, segment); - if (!partial || t < tokens.length - 1 || hasExactMatch) { - if (hasExactMatch) { - const transitions = nodeDef.statics[segment]; - for (const { to, reducer } of transitions) { - nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); - debug(` Static transition to ${to} found`); - } - } else { - debug(` No static transition found`); - } - } else { - let hasMatches = false; - for (const candidate of Object.keys(nodeDef.statics)) { - if (!candidate.startsWith(segment)) - continue; - if (segment === candidate) { - for (const { to, reducer } of nodeDef.statics[candidate]) { - nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); - debug(` Static transition to ${to} found`); - } - } else { - for (const { to } of nodeDef.statics[candidate]) { - nextBranches.push({ node: to, state: { ...state, remainder: candidate.slice(segment.length) } }); - debug(` Static transition to ${to} found (partial match)`); - } - } - hasMatches = true; - } - if (!hasMatches) { - debug(` No partial static transition found`); - } - } - if (segment !== END_OF_INPUT) { - for (const [test, { to, reducer }] of nodeDef.dynamics) { - if (execute(tests, test, state, segment)) { - nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); - debug(` Dynamic transition to ${to} found (via ${test})`); - } - } - } - } - if (nextBranches.length === 0 && segment === END_OF_INPUT && input.length === 1) { - return [{ - node: NODE_INITIAL, - state: basicHelpState - }]; - } - if (nextBranches.length === 0) { - throw new UnknownSyntaxError(input, branches.filter(({ node }) => { - return node !== NODE_ERRORED; - }).map(({ state }) => { - return { usage: state.candidateUsage, reason: null }; - })); - } - if (nextBranches.every(({ node }) => node === NODE_ERRORED)) { - throw new UnknownSyntaxError(input, nextBranches.map(({ state }) => { - return { usage: state.candidateUsage, reason: state.errorMessage }; - })); - } - branches = trimSmallerBranches(nextBranches); - } - if (branches.length > 0) { - debug(` Results:`); - for (const branch of branches) { - debug(` - ${branch.node} -> ${JSON.stringify(branch.state)}`); - } - } else { - debug(` No results`); - } - return branches; -} -function checkIfNodeIsFinished(node, state) { - if (state.selectedIndex !== null) - return true; - if (Object.prototype.hasOwnProperty.call(node.statics, END_OF_INPUT)) { - for (const { to } of node.statics[END_OF_INPUT]) - if (to === NODE_SUCCESS) - return true; - } - return false; -} -function suggestMachine(machine, input, partial) { - const prefix = partial && input.length > 0 ? [``] : []; - const branches = runMachineInternal(machine, input, partial); - const suggestions = []; - const suggestionsJson = /* @__PURE__ */ new Set(); - const traverseSuggestion = (suggestion, node, skipFirst = true) => { - let nextNodes = [node]; - while (nextNodes.length > 0) { - const currentNodes = nextNodes; - nextNodes = []; - for (const node2 of currentNodes) { - const nodeDef = machine.nodes[node2]; - const keys = Object.keys(nodeDef.statics); - for (const key of Object.keys(nodeDef.statics)) { - const segment = keys[0]; - for (const { to, reducer } of nodeDef.statics[segment]) { - if (reducer !== `pushPath`) - continue; - if (!skipFirst) - suggestion.push(segment); - nextNodes.push(to); - } - } - } - skipFirst = false; - } - const json = JSON.stringify(suggestion); - if (suggestionsJson.has(json)) - return; - suggestions.push(suggestion); - suggestionsJson.add(json); - }; - for (const { node, state } of branches) { - if (state.remainder !== null) { - traverseSuggestion([state.remainder], node); - continue; - } - const nodeDef = machine.nodes[node]; - const isFinished = checkIfNodeIsFinished(nodeDef, state); - for (const [candidate, transitions] of Object.entries(nodeDef.statics)) - if (isFinished && candidate !== END_OF_INPUT || !candidate.startsWith(`-`) && transitions.some(({ reducer }) => reducer === `pushPath`)) - traverseSuggestion([...prefix, candidate], node); - if (!isFinished) - continue; - for (const [test, { to }] of nodeDef.dynamics) { - if (to === NODE_ERRORED) - continue; - const tokens = suggest(test, state); - if (tokens === null) - continue; - for (const token of tokens) { - traverseSuggestion([...prefix, token], node); - } - } - } - return [...suggestions].sort(); -} -function runMachine(machine, input) { - const branches = runMachineInternal(machine, [...input, END_OF_INPUT]); - return selectBestState(input, branches.map(({ state }) => { - return state; - })); -} -function trimSmallerBranches(branches) { - let maxPathSize = 0; - for (const { state } of branches) - if (state.path.length > maxPathSize) - maxPathSize = state.path.length; - return branches.filter(({ state }) => { - return state.path.length === maxPathSize; - }); -} -function selectBestState(input, states) { - const terminalStates = states.filter((state) => { - return state.selectedIndex !== null; - }); - if (terminalStates.length === 0) - throw new Error(); - const requiredOptionsSetStates = terminalStates.filter((state) => state.selectedIndex === HELP_COMMAND_INDEX || state.requiredOptions.every((names) => names.some((name2) => state.options.find((opt) => opt.name === name2)))); - if (requiredOptionsSetStates.length === 0) { - throw new UnknownSyntaxError(input, terminalStates.map((state) => ({ - usage: state.candidateUsage, - reason: null - }))); - } - let maxPathSize = 0; - for (const state of requiredOptionsSetStates) - if (state.path.length > maxPathSize) - maxPathSize = state.path.length; - const bestPathBranches = requiredOptionsSetStates.filter((state) => { - return state.path.length === maxPathSize; - }); - const getPositionalCount = (state) => state.positionals.filter(({ extra }) => { - return !extra; - }).length + state.options.length; - const statesWithPositionalCount = bestPathBranches.map((state) => { - return { state, positionalCount: getPositionalCount(state) }; - }); - let maxPositionalCount = 0; - for (const { positionalCount } of statesWithPositionalCount) - if (positionalCount > maxPositionalCount) - maxPositionalCount = positionalCount; - const bestPositionalStates = statesWithPositionalCount.filter(({ positionalCount }) => { - return positionalCount === maxPositionalCount; - }).map(({ state }) => { - return state; - }); - const fixedStates = aggregateHelpStates(bestPositionalStates); - if (fixedStates.length > 1) - throw new AmbiguousSyntaxError(input, fixedStates.map((state) => state.candidateUsage)); - return fixedStates[0]; -} -function aggregateHelpStates(states) { - const notHelps = []; - const helps = []; - for (const state of states) { - if (state.selectedIndex === HELP_COMMAND_INDEX) { - helps.push(state); - } else { - notHelps.push(state); - } - } - if (helps.length > 0) { - notHelps.push({ - ...basicHelpState, - path: findCommonPrefix(...helps.map((state) => state.path)), - options: helps.reduce((options, state) => options.concat(state.options), []) - }); - } - return notHelps; -} -function findCommonPrefix(firstPath, secondPath, ...rest) { - if (secondPath === void 0) - return Array.from(firstPath); - return findCommonPrefix(firstPath.filter((segment, i) => segment === secondPath[i]), ...rest); -} -function makeNode() { - return { - dynamics: [], - shortcuts: [], - statics: {} - }; -} -function isTerminalNode(node) { - return node === NODE_SUCCESS || node === NODE_ERRORED; -} -function cloneTransition(input, offset = 0) { - return { - to: !isTerminalNode(input.to) ? input.to > 2 ? input.to + offset - 2 : input.to + offset : input.to, - reducer: input.reducer - }; -} -function cloneNode(input, offset = 0) { - const output = makeNode(); - for (const [test, transition] of input.dynamics) - output.dynamics.push([test, cloneTransition(transition, offset)]); - for (const transition of input.shortcuts) - output.shortcuts.push(cloneTransition(transition, offset)); - for (const [segment, transitions] of Object.entries(input.statics)) - output.statics[segment] = transitions.map((transition) => cloneTransition(transition, offset)); - return output; -} -function registerDynamic(machine, from, test, to, reducer) { - machine.nodes[from].dynamics.push([ - test, - { to, reducer } - ]); -} -function registerShortcut(machine, from, to, reducer) { - machine.nodes[from].shortcuts.push({ to, reducer }); -} -function registerStatic(machine, from, test, to, reducer) { - const store = !Object.prototype.hasOwnProperty.call(machine.nodes[from].statics, test) ? machine.nodes[from].statics[test] = [] : machine.nodes[from].statics[test]; - store.push({ to, reducer }); -} -function execute(store, callback, state, segment) { - if (Array.isArray(callback)) { - const [name2, ...args] = callback; - return store[name2](state, segment, ...args); - } else { - return store[callback](state, segment); - } -} -function suggest(callback, state) { - const fn2 = Array.isArray(callback) ? tests[callback[0]] : tests[callback]; - if (typeof fn2.suggest === `undefined`) - return null; - const args = Array.isArray(callback) ? callback.slice(1) : []; - return fn2.suggest(state, ...args); -} -var tests = { - always: () => { - return true; - }, - isOptionLike: (state, segment) => { - return !state.ignoreOptions && (segment !== `-` && segment.startsWith(`-`)); - }, - isNotOptionLike: (state, segment) => { - return state.ignoreOptions || segment === `-` || !segment.startsWith(`-`); - }, - isOption: (state, segment, name2, hidden) => { - return !state.ignoreOptions && segment === name2; - }, - isBatchOption: (state, segment, names) => { - return !state.ignoreOptions && BATCH_REGEX.test(segment) && [...segment.slice(1)].every((name2) => names.includes(`-${name2}`)); - }, - isBoundOption: (state, segment, names, options) => { - const optionParsing = segment.match(BINDING_REGEX); - return !state.ignoreOptions && !!optionParsing && OPTION_REGEX.test(optionParsing[1]) && names.includes(optionParsing[1]) && options.filter((opt) => opt.names.includes(optionParsing[1])).every((opt) => opt.allowBinding); - }, - isNegatedOption: (state, segment, name2) => { - return !state.ignoreOptions && segment === `--no-${name2.slice(2)}`; - }, - isHelp: (state, segment) => { - return !state.ignoreOptions && HELP_REGEX.test(segment); - }, - isUnsupportedOption: (state, segment, names) => { - return !state.ignoreOptions && segment.startsWith(`-`) && OPTION_REGEX.test(segment) && !names.includes(segment); - }, - isInvalidOption: (state, segment) => { - return !state.ignoreOptions && segment.startsWith(`-`) && !OPTION_REGEX.test(segment); - } -}; -tests.isOption.suggest = (state, name2, hidden = true) => { - return !hidden ? [name2] : null; -}; -var reducers = { - setCandidateState: (state, segment, candidateState) => { - return { ...state, ...candidateState }; - }, - setSelectedIndex: (state, segment, index) => { - return { ...state, selectedIndex: index }; - }, - pushBatch: (state, segment) => { - return { ...state, options: state.options.concat([...segment.slice(1)].map((name2) => ({ name: `-${name2}`, value: true }))) }; - }, - pushBound: (state, segment) => { - const [, name2, value] = segment.match(BINDING_REGEX); - return { ...state, options: state.options.concat({ name: name2, value }) }; - }, - pushPath: (state, segment) => { - return { ...state, path: state.path.concat(segment) }; - }, - pushPositional: (state, segment) => { - return { ...state, positionals: state.positionals.concat({ value: segment, extra: false }) }; - }, - pushExtra: (state, segment) => { - return { ...state, positionals: state.positionals.concat({ value: segment, extra: true }) }; - }, - pushExtraNoLimits: (state, segment) => { - return { ...state, positionals: state.positionals.concat({ value: segment, extra: NoLimits }) }; - }, - pushTrue: (state, segment, name2 = segment) => { - return { ...state, options: state.options.concat({ name: segment, value: true }) }; - }, - pushFalse: (state, segment, name2 = segment) => { - return { ...state, options: state.options.concat({ name: name2, value: false }) }; - }, - pushUndefined: (state, segment) => { - return { ...state, options: state.options.concat({ name: segment, value: void 0 }) }; - }, - pushStringValue: (state, segment) => { - var _a; - const copy = { ...state, options: [...state.options] }; - const lastOption = state.options[state.options.length - 1]; - lastOption.value = ((_a = lastOption.value) !== null && _a !== void 0 ? _a : []).concat([segment]); - return copy; - }, - setStringValue: (state, segment) => { - const copy = { ...state, options: [...state.options] }; - const lastOption = state.options[state.options.length - 1]; - lastOption.value = segment; - return copy; - }, - inhibateOptions: (state) => { - return { ...state, ignoreOptions: true }; - }, - useHelp: (state, segment, command) => { - const [ - , - /* name */ - , - index - ] = segment.match(HELP_REGEX); - if (typeof index !== `undefined`) { - return { ...state, options: [{ name: `-c`, value: String(command) }, { name: `-i`, value: index }] }; - } else { - return { ...state, options: [{ name: `-c`, value: String(command) }] }; - } - }, - setError: (state, segment, errorMessage) => { - if (segment === END_OF_INPUT) { - return { ...state, errorMessage: `${errorMessage}.` }; - } else { - return { ...state, errorMessage: `${errorMessage} ("${segment}").` }; - } - }, - setOptionArityError: (state, segment) => { - const lastOption = state.options[state.options.length - 1]; - return { ...state, errorMessage: `Not enough arguments to option ${lastOption.name}.` }; - } -}; -var NoLimits = Symbol(); -var CommandBuilder = class { - constructor(cliIndex, cliOpts) { - this.allOptionNames = []; - this.arity = { leading: [], trailing: [], extra: [], proxy: false }; - this.options = []; - this.paths = []; - this.cliIndex = cliIndex; - this.cliOpts = cliOpts; - } - addPath(path16) { - this.paths.push(path16); - } - setArity({ leading = this.arity.leading, trailing = this.arity.trailing, extra = this.arity.extra, proxy = this.arity.proxy }) { - Object.assign(this.arity, { leading, trailing, extra, proxy }); - } - addPositional({ name: name2 = `arg`, required = true } = {}) { - if (!required && this.arity.extra === NoLimits) - throw new Error(`Optional parameters cannot be declared when using .rest() or .proxy()`); - if (!required && this.arity.trailing.length > 0) - throw new Error(`Optional parameters cannot be declared after the required trailing positional arguments`); - if (!required && this.arity.extra !== NoLimits) { - this.arity.extra.push(name2); - } else if (this.arity.extra !== NoLimits && this.arity.extra.length === 0) { - this.arity.leading.push(name2); - } else { - this.arity.trailing.push(name2); - } - } - addRest({ name: name2 = `arg`, required = 0 } = {}) { - if (this.arity.extra === NoLimits) - throw new Error(`Infinite lists cannot be declared multiple times in the same command`); - if (this.arity.trailing.length > 0) - throw new Error(`Infinite lists cannot be declared after the required trailing positional arguments`); - for (let t = 0; t < required; ++t) - this.addPositional({ name: name2 }); - this.arity.extra = NoLimits; - } - addProxy({ required = 0 } = {}) { - this.addRest({ required }); - this.arity.proxy = true; - } - addOption({ names, description, arity = 0, hidden = false, required = false, allowBinding = true }) { - if (!allowBinding && arity > 1) - throw new Error(`The arity cannot be higher than 1 when the option only supports the --arg=value syntax`); - if (!Number.isInteger(arity)) - throw new Error(`The arity must be an integer, got ${arity}`); - if (arity < 0) - throw new Error(`The arity must be positive, got ${arity}`); - this.allOptionNames.push(...names); - this.options.push({ names, description, arity, hidden, required, allowBinding }); - } - setContext(context) { - this.context = context; - } - usage({ detailed = true, inlineOptions = true } = {}) { - const segments = [this.cliOpts.binaryName]; - const detailedOptionList = []; - if (this.paths.length > 0) - segments.push(...this.paths[0]); - if (detailed) { - for (const { names, arity, hidden, description, required } of this.options) { - if (hidden) - continue; - const args = []; - for (let t = 0; t < arity; ++t) - args.push(` #${t}`); - const definition = `${names.join(`,`)}${args.join(``)}`; - if (!inlineOptions && description) { - detailedOptionList.push({ definition, description, required }); - } else { - segments.push(required ? `<${definition}>` : `[${definition}]`); - } - } - segments.push(...this.arity.leading.map((name2) => `<${name2}>`)); - if (this.arity.extra === NoLimits) - segments.push(`...`); - else - segments.push(...this.arity.extra.map((name2) => `[${name2}]`)); - segments.push(...this.arity.trailing.map((name2) => `<${name2}>`)); - } - const usage = segments.join(` `); - return { usage, options: detailedOptionList }; - } - compile() { - if (typeof this.context === `undefined`) - throw new Error(`Assertion failed: No context attached`); - const machine = makeStateMachine(); - let firstNode = NODE_INITIAL; - const candidateUsage = this.usage().usage; - const requiredOptions = this.options.filter((opt) => opt.required).map((opt) => opt.names); - firstNode = injectNode(machine, makeNode()); - registerStatic(machine, NODE_INITIAL, START_OF_INPUT, firstNode, [`setCandidateState`, { candidateUsage, requiredOptions }]); - const positionalArgument = this.arity.proxy ? `always` : `isNotOptionLike`; - const paths = this.paths.length > 0 ? this.paths : [[]]; - for (const path16 of paths) { - let lastPathNode = firstNode; - if (path16.length > 0) { - const optionPathNode = injectNode(machine, makeNode()); - registerShortcut(machine, lastPathNode, optionPathNode); - this.registerOptions(machine, optionPathNode); - lastPathNode = optionPathNode; - } - for (let t = 0; t < path16.length; ++t) { - const nextPathNode = injectNode(machine, makeNode()); - registerStatic(machine, lastPathNode, path16[t], nextPathNode, `pushPath`); - lastPathNode = nextPathNode; - } - if (this.arity.leading.length > 0 || !this.arity.proxy) { - const helpNode = injectNode(machine, makeNode()); - registerDynamic(machine, lastPathNode, `isHelp`, helpNode, [`useHelp`, this.cliIndex]); - registerDynamic(machine, helpNode, `always`, helpNode, `pushExtra`); - registerStatic(machine, helpNode, END_OF_INPUT, NODE_SUCCESS, [`setSelectedIndex`, HELP_COMMAND_INDEX]); - this.registerOptions(machine, lastPathNode); - } - if (this.arity.leading.length > 0) - registerStatic(machine, lastPathNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); - let lastLeadingNode = lastPathNode; - for (let t = 0; t < this.arity.leading.length; ++t) { - const nextLeadingNode = injectNode(machine, makeNode()); - if (!this.arity.proxy || t + 1 !== this.arity.leading.length) - this.registerOptions(machine, nextLeadingNode); - if (this.arity.trailing.length > 0 || t + 1 !== this.arity.leading.length) - registerStatic(machine, nextLeadingNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); - registerDynamic(machine, lastLeadingNode, `isNotOptionLike`, nextLeadingNode, `pushPositional`); - lastLeadingNode = nextLeadingNode; - } - let lastExtraNode = lastLeadingNode; - if (this.arity.extra === NoLimits || this.arity.extra.length > 0) { - const extraShortcutNode = injectNode(machine, makeNode()); - registerShortcut(machine, lastLeadingNode, extraShortcutNode); - if (this.arity.extra === NoLimits) { - const extraNode = injectNode(machine, makeNode()); - if (!this.arity.proxy) - this.registerOptions(machine, extraNode); - registerDynamic(machine, lastLeadingNode, positionalArgument, extraNode, `pushExtraNoLimits`); - registerDynamic(machine, extraNode, positionalArgument, extraNode, `pushExtraNoLimits`); - registerShortcut(machine, extraNode, extraShortcutNode); - } else { - for (let t = 0; t < this.arity.extra.length; ++t) { - const nextExtraNode = injectNode(machine, makeNode()); - if (!this.arity.proxy || t > 0) - this.registerOptions(machine, nextExtraNode); - registerDynamic(machine, lastExtraNode, positionalArgument, nextExtraNode, `pushExtra`); - registerShortcut(machine, nextExtraNode, extraShortcutNode); - lastExtraNode = nextExtraNode; - } - } - lastExtraNode = extraShortcutNode; - } - if (this.arity.trailing.length > 0) - registerStatic(machine, lastExtraNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); - let lastTrailingNode = lastExtraNode; - for (let t = 0; t < this.arity.trailing.length; ++t) { - const nextTrailingNode = injectNode(machine, makeNode()); - if (!this.arity.proxy) - this.registerOptions(machine, nextTrailingNode); - if (t + 1 < this.arity.trailing.length) - registerStatic(machine, nextTrailingNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); - registerDynamic(machine, lastTrailingNode, `isNotOptionLike`, nextTrailingNode, `pushPositional`); - lastTrailingNode = nextTrailingNode; - } - registerDynamic(machine, lastTrailingNode, positionalArgument, NODE_ERRORED, [`setError`, `Extraneous positional argument`]); - registerStatic(machine, lastTrailingNode, END_OF_INPUT, NODE_SUCCESS, [`setSelectedIndex`, this.cliIndex]); - } - return { - machine, - context: this.context - }; - } - registerOptions(machine, node) { - registerDynamic(machine, node, [`isOption`, `--`], node, `inhibateOptions`); - registerDynamic(machine, node, [`isBatchOption`, this.allOptionNames], node, `pushBatch`); - registerDynamic(machine, node, [`isBoundOption`, this.allOptionNames, this.options], node, `pushBound`); - registerDynamic(machine, node, [`isUnsupportedOption`, this.allOptionNames], NODE_ERRORED, [`setError`, `Unsupported option name`]); - registerDynamic(machine, node, [`isInvalidOption`], NODE_ERRORED, [`setError`, `Invalid option name`]); - for (const option of this.options) { - const longestName = option.names.reduce((longestName2, name2) => { - return name2.length > longestName2.length ? name2 : longestName2; - }, ``); - if (option.arity === 0) { - for (const name2 of option.names) { - registerDynamic(machine, node, [`isOption`, name2, option.hidden || name2 !== longestName], node, `pushTrue`); - if (name2.startsWith(`--`) && !name2.startsWith(`--no-`)) { - registerDynamic(machine, node, [`isNegatedOption`, name2], node, [`pushFalse`, name2]); - } - } - } else { - let lastNode = injectNode(machine, makeNode()); - for (const name2 of option.names) - registerDynamic(machine, node, [`isOption`, name2, option.hidden || name2 !== longestName], lastNode, `pushUndefined`); - for (let t = 0; t < option.arity; ++t) { - const nextNode = injectNode(machine, makeNode()); - registerStatic(machine, lastNode, END_OF_INPUT, NODE_ERRORED, `setOptionArityError`); - registerDynamic(machine, lastNode, `isOptionLike`, NODE_ERRORED, `setOptionArityError`); - const action = option.arity === 1 ? `setStringValue` : `pushStringValue`; - registerDynamic(machine, lastNode, `isNotOptionLike`, nextNode, action); - lastNode = nextNode; - } - registerShortcut(machine, lastNode, node); - } - } - } -}; -var CliBuilder = class _CliBuilder { - constructor({ binaryName = `...` } = {}) { - this.builders = []; - this.opts = { binaryName }; - } - static build(cbs, opts = {}) { - return new _CliBuilder(opts).commands(cbs).compile(); - } - getBuilderByIndex(n) { - if (!(n >= 0 && n < this.builders.length)) - throw new Error(`Assertion failed: Out-of-bound command index (${n})`); - return this.builders[n]; - } - commands(cbs) { - for (const cb of cbs) - cb(this.command()); - return this; - } - command() { - const builder = new CommandBuilder(this.builders.length, this.opts); - this.builders.push(builder); - return builder; - } - compile() { - const machines = []; - const contexts = []; - for (const builder of this.builders) { - const { machine: machine2, context } = builder.compile(); - machines.push(machine2); - contexts.push(context); - } - const machine = makeAnyOfMachine(machines); - simplifyMachine(machine); - return { - machine, - contexts, - process: (input) => { - return runMachine(machine, input); - }, - suggest: (input, partial) => { - return suggestMachine(machine, input, partial); - } - }; - } -}; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/Cli.mjs -var import_platform = __toESM(require_node(), 1); - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/HelpCommand.mjs -var HelpCommand = class _HelpCommand extends Command { - constructor(contexts) { - super(); - this.contexts = contexts; - this.commands = []; - } - static from(state, contexts) { - const command = new _HelpCommand(contexts); - command.path = state.path; - for (const opt of state.options) { - switch (opt.name) { - case `-c`: - { - command.commands.push(Number(opt.value)); - } - break; - case `-i`: - { - command.index = Number(opt.value); - } - break; - } - } - return command; - } - async execute() { - let commands = this.commands; - if (typeof this.index !== `undefined` && this.index >= 0 && this.index < commands.length) - commands = [commands[this.index]]; - if (commands.length === 0) { - this.context.stdout.write(this.cli.usage()); - } else if (commands.length === 1) { - this.context.stdout.write(this.cli.usage(this.contexts[commands[0]].commandClass, { detailed: true })); - } else if (commands.length > 1) { - this.context.stdout.write(`Multiple commands match your selection: -`); - this.context.stdout.write(` -`); - let index = 0; - for (const command of this.commands) - this.context.stdout.write(this.cli.usage(this.contexts[command].commandClass, { prefix: `${index++}. `.padStart(5) })); - this.context.stdout.write(` -`); - this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`); - } - } -}; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/Cli.mjs -var errorCommandSymbol = Symbol(`clipanion/errorCommand`); -var Cli = class _Cli { - constructor({ binaryLabel, binaryName: binaryNameOpt = `...`, binaryVersion, enableCapture = false, enableColors } = {}) { - this.registrations = /* @__PURE__ */ new Map(); - this.builder = new CliBuilder({ binaryName: binaryNameOpt }); - this.binaryLabel = binaryLabel; - this.binaryName = binaryNameOpt; - this.binaryVersion = binaryVersion; - this.enableCapture = enableCapture; - this.enableColors = enableColors; - } - /** - * Creates a new Cli and registers all commands passed as parameters. - * - * @param commandClasses The Commands to register - * @returns The created `Cli` instance - */ - static from(commandClasses, options = {}) { - const cli = new _Cli(options); - const resolvedCommandClasses = Array.isArray(commandClasses) ? commandClasses : [commandClasses]; - for (const commandClass of resolvedCommandClasses) - cli.register(commandClass); - return cli; - } - /** - * Registers a command inside the CLI. - */ - register(commandClass) { - var _a; - const specs = /* @__PURE__ */ new Map(); - const command = new commandClass(); - for (const key in command) { - const value = command[key]; - if (typeof value === `object` && value !== null && value[Command.isOption]) { - specs.set(key, value); - } - } - const builder = this.builder.command(); - const index = builder.cliIndex; - const paths = (_a = commandClass.paths) !== null && _a !== void 0 ? _a : command.paths; - if (typeof paths !== `undefined`) - for (const path16 of paths) - builder.addPath(path16); - this.registrations.set(commandClass, { specs, builder, index }); - for (const [key, { definition }] of specs.entries()) - definition(builder, key); - builder.setContext({ - commandClass - }); - } - process(input, userContext) { - const { contexts, process: process5 } = this.builder.compile(); - const state = process5(input); - const context = { - ..._Cli.defaultContext, - ...userContext - }; - switch (state.selectedIndex) { - case HELP_COMMAND_INDEX: { - const command = HelpCommand.from(state, contexts); - command.context = context; - return command; - } - default: - { - const { commandClass } = contexts[state.selectedIndex]; - const record = this.registrations.get(commandClass); - if (typeof record === `undefined`) - throw new Error(`Assertion failed: Expected the command class to have been registered.`); - const command = new commandClass(); - command.context = context; - command.path = state.path; - try { - for (const [key, { transformer }] of record.specs.entries()) - command[key] = transformer(record.builder, key, state, context); - return command; - } catch (error) { - error[errorCommandSymbol] = command; - throw error; - } - } - break; - } - } - async run(input, userContext) { - var _a, _b; - let command; - const context = { - ..._Cli.defaultContext, - ...userContext - }; - const colored = (_a = this.enableColors) !== null && _a !== void 0 ? _a : context.colorDepth > 1; - if (!Array.isArray(input)) { - command = input; - } else { - try { - command = this.process(input, context); - } catch (error) { - context.stdout.write(this.error(error, { colored })); - return 1; - } - } - if (command.help) { - context.stdout.write(this.usage(command, { colored, detailed: true })); - return 0; - } - command.context = context; - command.cli = { - binaryLabel: this.binaryLabel, - binaryName: this.binaryName, - binaryVersion: this.binaryVersion, - enableCapture: this.enableCapture, - enableColors: this.enableColors, - definitions: () => this.definitions(), - error: (error, opts) => this.error(error, opts), - format: (colored2) => this.format(colored2), - process: (input2, subContext) => this.process(input2, { ...context, ...subContext }), - run: (input2, subContext) => this.run(input2, { ...context, ...subContext }), - usage: (command2, opts) => this.usage(command2, opts) - }; - const activate = this.enableCapture ? (_b = (0, import_platform.getCaptureActivator)(context)) !== null && _b !== void 0 ? _b : noopCaptureActivator : noopCaptureActivator; - let exitCode; - try { - exitCode = await activate(() => command.validateAndExecute().catch((error) => command.catch(error).then(() => 0))); - } catch (error) { - context.stdout.write(this.error(error, { colored, command })); - return 1; - } - return exitCode; - } - async runExit(input, context) { - process.exitCode = await this.run(input, context); - } - suggest(input, partial) { - const { suggest: suggest2 } = this.builder.compile(); - return suggest2(input, partial); - } - definitions({ colored = false } = {}) { - const data = []; - for (const [commandClass, { index }] of this.registrations) { - if (typeof commandClass.usage === `undefined`) - continue; - const { usage: path16 } = this.getUsageByIndex(index, { detailed: false }); - const { usage, options } = this.getUsageByIndex(index, { detailed: true, inlineOptions: false }); - const category = typeof commandClass.usage.category !== `undefined` ? formatMarkdownish(commandClass.usage.category, { format: this.format(colored), paragraphs: false }) : void 0; - const description = typeof commandClass.usage.description !== `undefined` ? formatMarkdownish(commandClass.usage.description, { format: this.format(colored), paragraphs: false }) : void 0; - const details = typeof commandClass.usage.details !== `undefined` ? formatMarkdownish(commandClass.usage.details, { format: this.format(colored), paragraphs: true }) : void 0; - const examples = typeof commandClass.usage.examples !== `undefined` ? commandClass.usage.examples.map(([label, cli]) => [formatMarkdownish(label, { format: this.format(colored), paragraphs: false }), cli.replace(/\$0/g, this.binaryName)]) : void 0; - data.push({ path: path16, usage, category, description, details, examples, options }); - } - return data; - } - usage(command = null, { colored, detailed = false, prefix = `$ ` } = {}) { - var _a; - if (command === null) { - for (const commandClass2 of this.registrations.keys()) { - const paths = commandClass2.paths; - const isDocumented = typeof commandClass2.usage !== `undefined`; - const isExclusivelyDefault = !paths || paths.length === 0 || paths.length === 1 && paths[0].length === 0; - const isDefault = isExclusivelyDefault || ((_a = paths === null || paths === void 0 ? void 0 : paths.some((path16) => path16.length === 0)) !== null && _a !== void 0 ? _a : false); - if (isDefault) { - if (command) { - command = null; - break; - } else { - command = commandClass2; - } - } else { - if (isDocumented) { - command = null; - continue; - } - } - } - if (command) { - detailed = true; - } - } - const commandClass = command !== null && command instanceof Command ? command.constructor : command; - let result = ``; - if (!commandClass) { - const commandsByCategories = /* @__PURE__ */ new Map(); - for (const [commandClass2, { index }] of this.registrations.entries()) { - if (typeof commandClass2.usage === `undefined`) - continue; - const category = typeof commandClass2.usage.category !== `undefined` ? formatMarkdownish(commandClass2.usage.category, { format: this.format(colored), paragraphs: false }) : null; - let categoryCommands = commandsByCategories.get(category); - if (typeof categoryCommands === `undefined`) - commandsByCategories.set(category, categoryCommands = []); - const { usage } = this.getUsageByIndex(index); - categoryCommands.push({ commandClass: commandClass2, usage }); - } - const categoryNames = Array.from(commandsByCategories.keys()).sort((a, b) => { - if (a === null) - return -1; - if (b === null) - return 1; - return a.localeCompare(b, `en`, { usage: `sort`, caseFirst: `upper` }); - }); - const hasLabel = typeof this.binaryLabel !== `undefined`; - const hasVersion = typeof this.binaryVersion !== `undefined`; - if (hasLabel || hasVersion) { - if (hasLabel && hasVersion) - result += `${this.format(colored).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`; - else if (hasLabel) - result += `${this.format(colored).header(`${this.binaryLabel}`)} -`; - else - result += `${this.format(colored).header(`${this.binaryVersion}`)} -`; - result += ` ${this.format(colored).bold(prefix)}${this.binaryName} -`; - } else { - result += `${this.format(colored).bold(prefix)}${this.binaryName} -`; - } - for (const categoryName of categoryNames) { - const commands = commandsByCategories.get(categoryName).slice().sort((a, b) => { - return a.usage.localeCompare(b.usage, `en`, { usage: `sort`, caseFirst: `upper` }); - }); - const header = categoryName !== null ? categoryName.trim() : `General commands`; - result += ` -`; - result += `${this.format(colored).header(`${header}`)} -`; - for (const { commandClass: commandClass2, usage } of commands) { - const doc = commandClass2.usage.description || `undocumented`; - result += ` -`; - result += ` ${this.format(colored).bold(usage)} -`; - result += ` ${formatMarkdownish(doc, { format: this.format(colored), paragraphs: false })}`; - } - } - result += ` -`; - result += formatMarkdownish(`You can also print more details about any of these commands by calling them with the \`-h,--help\` flag right after the command name.`, { format: this.format(colored), paragraphs: true }); - } else { - if (!detailed) { - const { usage } = this.getUsageByRegistration(commandClass); - result += `${this.format(colored).bold(prefix)}${usage} -`; - } else { - const { description = ``, details = ``, examples = [] } = commandClass.usage || {}; - if (description !== ``) { - result += formatMarkdownish(description, { format: this.format(colored), paragraphs: false }).replace(/^./, ($0) => $0.toUpperCase()); - result += ` -`; - } - if (details !== `` || examples.length > 0) { - result += `${this.format(colored).header(`Usage`)} -`; - result += ` -`; - } - const { usage, options } = this.getUsageByRegistration(commandClass, { inlineOptions: false }); - result += `${this.format(colored).bold(prefix)}${usage} -`; - if (options.length > 0) { - result += ` -`; - result += `${this.format(colored).header(`Options`)} -`; - const maxDefinitionLength = options.reduce((length, option) => { - return Math.max(length, option.definition.length); - }, 0); - result += ` -`; - for (const { definition, description: description2 } of options) { - result += ` ${this.format(colored).bold(definition.padEnd(maxDefinitionLength))} ${formatMarkdownish(description2, { format: this.format(colored), paragraphs: false })}`; - } - } - if (details !== ``) { - result += ` -`; - result += `${this.format(colored).header(`Details`)} -`; - result += ` -`; - result += formatMarkdownish(details, { format: this.format(colored), paragraphs: true }); - } - if (examples.length > 0) { - result += ` -`; - result += `${this.format(colored).header(`Examples`)} -`; - for (const [description2, example] of examples) { - result += ` -`; - result += formatMarkdownish(description2, { format: this.format(colored), paragraphs: false }); - result += `${example.replace(/^/m, ` ${this.format(colored).bold(prefix)}`).replace(/\$0/g, this.binaryName)} -`; - } - } - } - } - return result; - } - error(error, _a) { - var _b; - var { colored, command = (_b = error[errorCommandSymbol]) !== null && _b !== void 0 ? _b : null } = _a === void 0 ? {} : _a; - if (!error || typeof error !== `object` || !(`stack` in error)) - error = new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(error)})`); - let result = ``; - let name2 = error.name.replace(/([a-z])([A-Z])/g, `$1 $2`); - if (name2 === `Error`) - name2 = `Internal Error`; - result += `${this.format(colored).error(name2)}: ${error.message} -`; - const meta = error.clipanion; - if (typeof meta !== `undefined`) { - if (meta.type === `usage`) { - result += ` -`; - result += this.usage(command); - } - } else { - if (error.stack) { - result += `${error.stack.replace(/^.*\n/, ``)} -`; - } - } - return result; - } - format(colored) { - var _a; - return ((_a = colored !== null && colored !== void 0 ? colored : this.enableColors) !== null && _a !== void 0 ? _a : _Cli.defaultContext.colorDepth > 1) ? richFormat : textFormat; - } - getUsageByRegistration(klass, opts) { - const record = this.registrations.get(klass); - if (typeof record === `undefined`) - throw new Error(`Assertion failed: Unregistered command`); - return this.getUsageByIndex(record.index, opts); - } - getUsageByIndex(n, opts) { - return this.builder.getBuilderByIndex(n).usage(opts); - } -}; -Cli.defaultContext = { - env: process.env, - stdin: process.stdin, - stdout: process.stdout, - stderr: process.stderr, - colorDepth: (0, import_platform.getDefaultColorDepth)() -}; -function noopCaptureActivator(fn2) { - return fn2(); -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/index.mjs -var builtins_exports = {}; -__export(builtins_exports, { - DefinitionsCommand: () => DefinitionsCommand, - HelpCommand: () => HelpCommand2, - VersionCommand: () => VersionCommand -}); - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/definitions.mjs -var DefinitionsCommand = class extends Command { - async execute() { - this.context.stdout.write(`${JSON.stringify(this.cli.definitions(), null, 2)} -`); - } -}; -DefinitionsCommand.paths = [[`--clipanion=definitions`]]; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/help.mjs -var HelpCommand2 = class extends Command { - async execute() { - this.context.stdout.write(this.cli.usage()); - } -}; -HelpCommand2.paths = [[`-h`], [`--help`]]; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/builtins/version.mjs -var VersionCommand = class extends Command { - async execute() { - var _a; - this.context.stdout.write(`${(_a = this.cli.binaryVersion) !== null && _a !== void 0 ? _a : ``} -`); - } -}; -VersionCommand.paths = [[`-v`], [`--version`]]; - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/index.mjs -var options_exports = {}; -__export(options_exports, { - Array: () => Array2, - Boolean: () => Boolean2, - Counter: () => Counter, - Proxy: () => Proxy2, - Rest: () => Rest, - String: () => String2, - applyValidator: () => applyValidator, - cleanValidationError: () => cleanValidationError, - formatError: () => formatError, - isOptionSymbol: () => isOptionSymbol, - makeCommandOption: () => makeCommandOption, - rerouteArguments: () => rerouteArguments -}); - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Array.mjs -function Array2(descriptor, initialValueBase, optsBase) { - const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); - const { arity = 1 } = opts; - const optNames = descriptor.split(`,`); - const nameSet = new Set(optNames); - return makeCommandOption({ - definition(builder) { - builder.addOption({ - names: optNames, - arity, - hidden: opts === null || opts === void 0 ? void 0 : opts.hidden, - description: opts === null || opts === void 0 ? void 0 : opts.description, - required: opts.required - }); - }, - transformer(builder, key, state) { - let usedName; - let currentValue = typeof initialValue !== `undefined` ? [...initialValue] : void 0; - for (const { name: name2, value } of state.options) { - if (!nameSet.has(name2)) - continue; - usedName = name2; - currentValue = currentValue !== null && currentValue !== void 0 ? currentValue : []; - currentValue.push(value); - } - if (typeof currentValue !== `undefined`) { - return applyValidator(usedName !== null && usedName !== void 0 ? usedName : key, currentValue, opts.validator); - } else { - return currentValue; - } - } - }); -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Boolean.mjs -function Boolean2(descriptor, initialValueBase, optsBase) { - const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); - const optNames = descriptor.split(`,`); - const nameSet = new Set(optNames); - return makeCommandOption({ - definition(builder) { - builder.addOption({ - names: optNames, - allowBinding: false, - arity: 0, - hidden: opts.hidden, - description: opts.description, - required: opts.required - }); - }, - transformer(builer, key, state) { - let currentValue = initialValue; - for (const { name: name2, value } of state.options) { - if (!nameSet.has(name2)) - continue; - currentValue = value; - } - return currentValue; - } - }); -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Counter.mjs -function Counter(descriptor, initialValueBase, optsBase) { - const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); - const optNames = descriptor.split(`,`); - const nameSet = new Set(optNames); - return makeCommandOption({ - definition(builder) { - builder.addOption({ - names: optNames, - allowBinding: false, - arity: 0, - hidden: opts.hidden, - description: opts.description, - required: opts.required - }); - }, - transformer(builder, key, state) { - let currentValue = initialValue; - for (const { name: name2, value } of state.options) { - if (!nameSet.has(name2)) - continue; - currentValue !== null && currentValue !== void 0 ? currentValue : currentValue = 0; - if (!value) { - currentValue = 0; - } else { - currentValue += 1; - } - } - return currentValue; - } - }); -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Proxy.mjs -function Proxy2(opts = {}) { - return makeCommandOption({ - definition(builder, key) { - var _a; - builder.addProxy({ - name: (_a = opts.name) !== null && _a !== void 0 ? _a : key, - required: opts.required - }); - }, - transformer(builder, key, state) { - return state.positionals.map(({ value }) => value); - } - }); -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/Rest.mjs -function Rest(opts = {}) { - return makeCommandOption({ - definition(builder, key) { - var _a; - builder.addRest({ - name: (_a = opts.name) !== null && _a !== void 0 ? _a : key, - required: opts.required - }); - }, - transformer(builder, key, state) { - const isRestPositional = (index) => { - const positional = state.positionals[index]; - if (positional.extra === NoLimits) - return true; - if (positional.extra === false && index < builder.arity.leading.length) - return true; - return false; - }; - let count = 0; - while (count < state.positionals.length && isRestPositional(count)) - count += 1; - return state.positionals.splice(0, count).map(({ value }) => value); - } - }); -} - -// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/advanced/options/String.mjs -function StringOption(descriptor, initialValueBase, optsBase) { - const [initialValue, opts] = rerouteArguments(initialValueBase, optsBase !== null && optsBase !== void 0 ? optsBase : {}); - const { arity = 1 } = opts; - const optNames = descriptor.split(`,`); - const nameSet = new Set(optNames); - return makeCommandOption({ - definition(builder) { - builder.addOption({ - names: optNames, - arity: opts.tolerateBoolean ? 0 : arity, - hidden: opts.hidden, - description: opts.description, - required: opts.required - }); - }, - transformer(builder, key, state, context) { - let usedName; - let currentValue = initialValue; - if (typeof opts.env !== `undefined` && context.env[opts.env]) { - usedName = opts.env; - currentValue = context.env[opts.env]; - } - for (const { name: name2, value } of state.options) { - if (!nameSet.has(name2)) - continue; - usedName = name2; - currentValue = value; - } - if (typeof currentValue === `string`) { - return applyValidator(usedName !== null && usedName !== void 0 ? usedName : key, currentValue, opts.validator); - } else { - return currentValue; - } - } - }); -} -function StringPositional(opts = {}) { - const { required = true } = opts; - return makeCommandOption({ - definition(builder, key) { - var _a; - builder.addPositional({ - name: (_a = opts.name) !== null && _a !== void 0 ? _a : key, - required: opts.required - }); - }, - transformer(builder, key, state) { - var _a; - for (let i = 0; i < state.positionals.length; ++i) { - if (state.positionals[i].extra === NoLimits) - continue; - if (required && state.positionals[i].extra === true) - continue; - if (!required && state.positionals[i].extra === false) - continue; - const [positional] = state.positionals.splice(i, 1); - return applyValidator((_a = opts.name) !== null && _a !== void 0 ? _a : key, positional.value, opts.validator); - } - return void 0; - } - }); -} -function String2(descriptor, ...args) { - if (typeof descriptor === `string`) { - return StringOption(descriptor, ...args); - } else { - return StringPositional(descriptor); - } -} - -// package.json -var version = "0.34.5"; - -// sources/Engine.ts -var import_fs6 = __toESM(require("fs")); -var import_path5 = __toESM(require("path")); -var import_process3 = __toESM(require("process")); -var import_rcompare = __toESM(require_rcompare()); -var import_valid3 = __toESM(require_valid()); -var import_valid4 = __toESM(require_valid2()); - -// config.json -var config_default = { - definitions: { - npm: { - default: "11.6.3+sha1.3f581bca37cbdadf2be04346c0e5b0be96cdd54b", - fetchLatestFrom: { - type: "npm", - package: "npm" - }, - transparent: { - commands: [ - [ - "npm", - "init" - ], - [ - "npx" - ] - ] - }, - ranges: { - "*": { - url: "https://registry.npmjs.org/npm/-/npm-{}.tgz", - bin: { - npm: "./bin/npm-cli.js", - npx: "./bin/npx-cli.js" - }, - registry: { - type: "npm", - package: "npm" - }, - commands: { - use: [ - "npm", - "install" - ] - } - } - } - }, - pnpm: { - default: "10.23.0+sha1.b4a44ab0dc2adf2e36371d11d8eb0dc78ffc976c", - fetchLatestFrom: { - type: "npm", - package: "pnpm" - }, - transparent: { - commands: [ - [ - "pnpm", - "init" - ], - [ - "pnpx" - ], - [ - "pnpm", - "dlx" - ] - ] - }, - ranges: { - "<6.0.0": { - url: "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", - bin: { - pnpm: "./bin/pnpm.js", - pnpx: "./bin/pnpx.js" - }, - registry: { - type: "npm", - package: "pnpm" - }, - commands: { - use: [ - "pnpm", - "install" - ] - } - }, - "6.x || 7.x || 8.x || 9.x || 10.x": { - url: "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", - bin: { - pnpm: "./bin/pnpm.cjs", - pnpx: "./bin/pnpx.cjs" - }, - registry: { - type: "npm", - package: "pnpm" - }, - commands: { - use: [ - "pnpm", - "install" - ] - } - }, - ">=11.0.0": { - url: "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", - bin: { - pnpm: "./bin/pnpm.mjs", - pnpx: "./bin/pnpx.mjs" - }, - registry: { - type: "npm", - package: "pnpm" - }, - commands: { - use: [ - "pnpm", - "install" - ] - } - } - } - }, - yarn: { - default: "1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610", - fetchLatestFrom: { - type: "npm", - package: "yarn" - }, - transparent: { - default: "4.11.0+sha224.209a3e277c6bbc03df6e4206fbfcb0c1621c27ecf0688f79a0c619f0", - commands: [ - [ - "yarn", - "init" - ], - [ - "yarn", - "dlx" - ] - ] - }, - ranges: { - "<2.0.0": { - url: "https://registry.yarnpkg.com/yarn/-/yarn-{}.tgz", - bin: { - yarn: "./bin/yarn.js", - yarnpkg: "./bin/yarn.js" - }, - registry: { - type: "npm", - package: "yarn" - }, - commands: { - use: [ - "yarn", - "install" - ] - } - }, - ">=2.0.0": { - name: "yarn", - url: "https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js", - bin: [ - "yarn", - "yarnpkg" - ], - registry: { - type: "url", - url: "https://repo.yarnpkg.com/tags", - fields: { - tags: "aliases", - versions: "tags" - } - }, - npmRegistry: { - type: "npm", - package: "@yarnpkg/cli-dist", - bin: "bin/yarn.js" - }, - commands: { - use: [ - "yarn", - "install" - ] - } - } - } - } - }, - keys: { - npm: [ - { - expires: "2025-01-29T00:00:00.000Z", - keyid: "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA", - keytype: "ecdsa-sha2-nistp256", - scheme: "ecdsa-sha2-nistp256", - key: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg==" - }, - { - expires: null, - keyid: "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U", - keytype: "ecdsa-sha2-nistp256", - scheme: "ecdsa-sha2-nistp256", - key: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEY6Ya7W++7aUPzvMTrezH6Ycx3c+HOKYCcNGybJZSCJq/fd7Qa8uuAKtdIkUQtQiEKERhAmE5lMMJhP8OkDOa2g==" - } - ] - } -}; - -// sources/corepackUtils.ts -var import_crypto2 = require("crypto"); -var import_events4 = require("events"); -var import_fs4 = __toESM(require("fs")); -var import_module = __toESM(require("module")); -var import_path3 = __toESM(require("path")); -var import_range = __toESM(require_range()); -var import_semver = __toESM(require_semver()); -var import_lt = __toESM(require_lt()); -var import_parse3 = __toESM(require_parse()); -var import_promises2 = require("timers/promises"); - -// sources/debugUtils.ts -var import_debug = __toESM(require_src()); -var log = (0, import_debug.default)(`corepack`); - -// sources/folderUtils.ts -var import_fs = require("fs"); -var import_os = require("os"); -var import_path = require("path"); -var import_process = __toESM(require("process")); -var INSTALL_FOLDER_VERSION = 1; -function getCorepackHomeFolder() { - return import_process.default.env.COREPACK_HOME ?? (0, import_path.join)( - import_process.default.env.XDG_CACHE_HOME ?? import_process.default.env.LOCALAPPDATA ?? (0, import_path.join)((0, import_os.homedir)(), import_process.default.platform === `win32` ? `AppData/Local` : `.cache`), - `node/corepack` - ); -} -function getInstallFolder() { - return (0, import_path.join)( - getCorepackHomeFolder(), - `v${INSTALL_FOLDER_VERSION}` - ); -} -function getTemporaryFolder(target = (0, import_os.tmpdir)()) { - (0, import_fs.mkdirSync)(target, { recursive: true }); - while (true) { - const rnd = Math.random() * 4294967296; - const hex = rnd.toString(16).padStart(8, `0`); - const path16 = (0, import_path.join)(target, `corepack-${import_process.default.pid}-${hex}`); - try { - (0, import_fs.mkdirSync)(path16); - return path16; - } catch (error) { - if (error.code === `EEXIST`) { - continue; - } else if (error.code === `EACCES`) { - throw new UsageError(`Failed to create cache directory. Please ensure the user has write access to the target directory (${target}). If the user's home directory does not exist, create it first.`); - } else { - throw error; - } - } - } -} - -// sources/httpUtils.ts -var import_assert = __toESM(require("assert")); -var import_events = require("events"); -var import_process2 = require("process"); -var import_stream = require("stream"); - -// sources/npmRegistryUtils.ts -var import_crypto = require("crypto"); -var DEFAULT_HEADERS = { - [`Accept`]: `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8` -}; -var DEFAULT_NPM_REGISTRY_URL = `https://registry.npmjs.org`; -async function fetchAsJson2(packageName, version2) { - const npmRegistryUrl = process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL; - if (process.env.COREPACK_ENABLE_NETWORK === `0`) - throw new UsageError(`Network access disabled by the environment; can't reach npm repository ${npmRegistryUrl}`); - const headers = { ...DEFAULT_HEADERS }; - if (`COREPACK_NPM_TOKEN` in process.env) { - headers.authorization = `Bearer ${process.env.COREPACK_NPM_TOKEN}`; - } else if (`COREPACK_NPM_USERNAME` in process.env && `COREPACK_NPM_PASSWORD` in process.env) { - const encodedCreds = Buffer.from(`${process.env.COREPACK_NPM_USERNAME}:${process.env.COREPACK_NPM_PASSWORD}`, `utf8`).toString(`base64`); - headers.authorization = `Basic ${encodedCreds}`; - } - return fetchAsJson(`${npmRegistryUrl}/${packageName}${version2 ? `/${version2}` : ``}`, { headers }); -} -function verifySignature({ signatures, integrity, packageName, version: version2 }) { - if (!Array.isArray(signatures) || !signatures.length) throw new Error(`No compatible signature found in package metadata`); - const { npm: trustedKeys } = process.env.COREPACK_INTEGRITY_KEYS ? JSON.parse(process.env.COREPACK_INTEGRITY_KEYS) : config_default.keys; - let signature; - let key; - for (const k of trustedKeys) { - signature = signatures.find(({ keyid }) => keyid === k.keyid); - if (signature != null) { - key = k.key; - break; - } - } - if (signature?.sig == null) throw new UsageError(`The package was not signed by any trusted keys: ${JSON.stringify({ signatures, trustedKeys }, void 0, 2)}`); - const verifier = (0, import_crypto.createVerify)(`SHA256`); - verifier.end(`${packageName}@${version2}:${integrity}`); - const valid = verifier.verify( - `-----BEGIN PUBLIC KEY----- -${key} ------END PUBLIC KEY-----`, - signature.sig, - `base64` - ); - if (!valid) { - throw new Error(`Signature does not match`); - } -} -async function fetchLatestStableVersion(packageName) { - const metadata = await fetchAsJson2(packageName, `latest`); - const { version: version2, dist: { integrity, signatures, shasum } } = metadata; - if (!shouldSkipIntegrityCheck()) { - try { - verifySignature({ - packageName, - version: version2, - integrity, - signatures - }); - } catch (cause) { - throw new Error(`Corepack cannot download the latest stable version of ${packageName}; you can disable signature verification by setting COREPACK_INTEGRITY_CHECK to 0 in your env, or instruct Corepack to use the latest stable release known by this version of Corepack by setting COREPACK_USE_LATEST to 0`, { cause }); - } - } - return `${version2}+${integrity ? `sha512.${Buffer.from(integrity.slice(7), `base64`).toString(`hex`)}` : `sha1.${shasum}`}`; -} -async function fetchAvailableTags(packageName) { - const metadata = await fetchAsJson2(packageName); - return metadata[`dist-tags`]; -} -async function fetchAvailableVersions(packageName) { - const metadata = await fetchAsJson2(packageName); - return Object.keys(metadata.versions); -} -async function fetchTarballURLAndSignature(packageName, version2) { - const versionMetadata = await fetchAsJson2(packageName, version2); - const { tarball, signatures, integrity } = versionMetadata.dist; - if (tarball === void 0 || !tarball.startsWith(`http`)) - throw new Error(`${packageName}@${version2} does not have a valid tarball.`); - return { tarball, signatures, integrity }; -} - -// sources/httpUtils.ts -async function fetch(input, init) { - if (process.env.COREPACK_ENABLE_NETWORK === `0`) - throw new UsageError(`Network access disabled by the environment; can't reach ${input}`); - const agent = await getProxyAgent(input); - if (typeof input === `string`) - input = new URL(input); - let headers = init?.headers; - const username = input.username || process.env.COREPACK_NPM_USERNAME; - const password = input.password || process.env.COREPACK_NPM_PASSWORD; - if (username || password) { - headers = { - ...headers, - authorization: `Basic ${Buffer.from(`${username}:${password}`).toString(`base64`)}` - }; - input.username = input.password = ``; - } - const registry = process.env.COREPACK_NPM_TOKEN && new URL(process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL); - if (registry && input.origin === registry.origin) { - headers = { - ...headers, - authorization: `Bearer ${process.env.COREPACK_NPM_TOKEN}` - }; - } - let response; - try { - response = await globalThis.fetch(input, { - ...init, - dispatcher: agent, - headers - }); - } catch (error) { - throw new Error( - `Error when performing the request to ${input}; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting`, - { cause: error } - ); - } - if (!response.ok) { - await response.arrayBuffer(); - throw new Error( - `Server answered with HTTP ${response.status} when performing the request to ${input}; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting` - ); - } - return response; -} -async function fetchAsJson(input, init) { - const response = await fetch(input, init); - return response.json(); -} -async function fetchUrlStream(input, init) { - if (process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT === `1`) { - console.error(`! Corepack is about to download ${input}`); - if (import_process2.stdin.isTTY && !process.env.CI) { - import_process2.stderr.write(`? Do you want to continue? [Y/n] `); - import_process2.stdin.resume(); - const chars = await (0, import_events.once)(import_process2.stdin, `data`); - import_process2.stdin.pause(); - if (chars[0][0] === 110 || chars[0][0] === 78) - throw new UsageError(`Aborted by the user`); - console.error(); - } - } - const response = await fetch(input, init); - const webStream = response.body; - (0, import_assert.default)(webStream, `Expected stream to be set`); - const stream = import_stream.Readable.fromWeb(webStream); - return stream; -} -var ProxyAgent; -async function getProxyAgent(input) { - const { getProxyForUrl } = await Promise.resolve().then(() => __toESM(require_proxy_from_env())); - const proxy = getProxyForUrl(input); - if (!proxy) return void 0; - if (ProxyAgent == null) { - const [api, Dispatcher, _ProxyAgent] = await Promise.all([ - // @ts-expect-error internal module is untyped - Promise.resolve().then(() => __toESM(require_api())), - // @ts-expect-error internal module is untyped - Promise.resolve().then(() => __toESM(require_dispatcher())), - // @ts-expect-error internal module is untyped - Promise.resolve().then(() => __toESM(require_proxy_agent())) - ]); - Object.assign(Dispatcher.default.prototype, api.default); - ProxyAgent = _ProxyAgent.default; - } - return new ProxyAgent(proxy); -} - -// sources/nodeUtils.ts -var import_os2 = __toESM(require("os")); -function isNodeError(err) { - return !!err?.code; -} -function isExistError(err) { - return err.code === `EEXIST` || err.code === `ENOTEMPTY`; -} -function getEndOfLine(content) { - const matches = content.match(/\r?\n/g); - if (matches === null) - return import_os2.default.EOL; - const crlf = matches.filter((nl) => nl === `\r -`).length; - const lf = matches.length - crlf; - return crlf > lf ? `\r -` : ` -`; -} -function normalizeLineEndings(originalContent, newContent) { - return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); -} -function getIndent(content) { - const indentMatch = content.match(/^[ \t]+/m); - if (indentMatch) { - return indentMatch[0]; - } else { - return ` `; - } -} -function stripBOM(content) { - if (content.charCodeAt(0) === 65279) { - return content.slice(1); - } else { - return content; - } -} -function readPackageJson(content) { - return { - data: JSON.parse(stripBOM(content) || `{}`), - indent: getIndent(content) - }; -} - -// sources/corepackUtils.ts -var YARN_SWITCH_REGEX = /[/\\]switch[/\\]bin[/\\]/; -function isYarnSwitchPath(p) { - return YARN_SWITCH_REGEX.test(p); -} -function getRegistryFromPackageManagerSpec(spec) { - return process.env.COREPACK_NPM_REGISTRY ? spec.npmRegistry ?? spec.registry : spec.registry; -} -async function fetchLatestStableVersion2(spec) { - switch (spec.type) { - case `npm`: { - return await fetchLatestStableVersion(spec.package); - } - case `url`: { - const data = await fetchAsJson(spec.url); - return data[spec.fields.tags].stable; - } - default: { - throw new Error(`Unsupported specification ${JSON.stringify(spec)}`); - } - } -} -async function fetchAvailableTags2(spec) { - switch (spec.type) { - case `npm`: { - return await fetchAvailableTags(spec.package); - } - case `url`: { - const data = await fetchAsJson(spec.url); - return data[spec.fields.tags]; - } - default: { - throw new Error(`Unsupported specification ${JSON.stringify(spec)}`); - } - } -} -async function fetchAvailableVersions2(spec) { - switch (spec.type) { - case `npm`: { - return await fetchAvailableVersions(spec.package); - } - case `url`: { - const data = await fetchAsJson(spec.url); - const field = data[spec.fields.versions]; - return Array.isArray(field) ? field : Object.keys(field); - } - default: { - throw new Error(`Unsupported specification ${JSON.stringify(spec)}`); - } - } -} -async function findInstalledVersion(installTarget, descriptor) { - const installFolder = import_path3.default.join(installTarget, descriptor.name); - let cacheDirectory; - try { - cacheDirectory = await import_fs4.default.promises.opendir(installFolder); - } catch (error) { - if (isNodeError(error) && error.code === `ENOENT`) { - return null; - } else { - throw error; - } - } - const range = new import_range.default(descriptor.range); - let bestMatch = null; - let maxSV = void 0; - for await (const { name: name2 } of cacheDirectory) { - if (name2.startsWith(`.`)) - continue; - if (range.test(name2) && maxSV?.compare(name2) !== 1) { - bestMatch = name2; - maxSV = new import_semver.default(bestMatch); - } - } - return bestMatch; -} -function isSupportedPackageManagerDescriptor(descriptor) { - return !URL.canParse(descriptor.range); -} -function isSupportedPackageManagerLocator(locator) { - return !URL.canParse(locator.reference); -} -function parseURLReference(locator) { - const { hash, href } = new URL(locator.reference); - if (hash) { - return { - version: encodeURIComponent(href.slice(0, -hash.length)), - build: hash.slice(1).split(`.`) - }; - } - return { version: encodeURIComponent(href), build: [] }; -} -function isValidBinList(x) { - return Array.isArray(x) && x.length > 0; -} -function isValidBinSpec(x) { - return typeof x === `object` && x !== null && !Array.isArray(x) && Object.keys(x).length > 0; -} -async function download(installTarget, url, algo, binPath = null) { - const tmpFolder = getTemporaryFolder(installTarget); - log(`Downloading to ${tmpFolder}`); - const stream = await fetchUrlStream(url); - const parsedUrl = new URL(url); - const ext = import_path3.default.posix.extname(parsedUrl.pathname); - let outputFile = null; - let sendTo; - if (ext === `.tgz`) { - const { extract: tarX } = await Promise.resolve().then(() => (init_extract(), extract_exports)); - sendTo = tarX({ - strip: 1, - cwd: tmpFolder, - filter: binPath ? (path16) => { - const pos2 = path16.indexOf(`/`); - return pos2 !== -1 && path16.slice(pos2 + 1) === binPath; - } : void 0 - }); - } else if (ext === `.js`) { - outputFile = import_path3.default.join(tmpFolder, import_path3.default.posix.basename(parsedUrl.pathname)); - sendTo = import_fs4.default.createWriteStream(outputFile); - } - stream.pipe(sendTo); - let hash = !binPath ? stream.pipe((0, import_crypto2.createHash)(algo)) : null; - await (0, import_events4.once)(sendTo, `finish`); - if (binPath) { - const downloadedBin = import_path3.default.join(tmpFolder, binPath); - outputFile = import_path3.default.join(tmpFolder, import_path3.default.basename(downloadedBin)); - try { - await renameSafe(downloadedBin, outputFile); - } catch (err) { - if (isNodeError(err) && err.code === `ENOENT`) - throw new Error(`Cannot locate '${binPath}' in downloaded tarball`, { cause: err }); - if (isNodeError(err) && isExistError(err)) { - await import_fs4.default.promises.rm(downloadedBin); - } else { - throw err; - } - } - const fileStream = import_fs4.default.createReadStream(outputFile); - hash = fileStream.pipe((0, import_crypto2.createHash)(algo)); - await (0, import_events4.once)(fileStream, `close`); - } - return { - tmpFolder, - outputFile, - hash: hash.digest(`hex`) - }; -} -async function installVersion(installTarget, locator, { spec }) { - const locatorIsASupportedPackageManager = isSupportedPackageManagerLocator(locator); - const locatorReference = locatorIsASupportedPackageManager ? (0, import_parse3.default)(locator.reference) : parseURLReference(locator); - const { version: version2, build } = locatorReference; - const installFolder = import_path3.default.join(installTarget, locator.name, version2); - try { - const corepackFile = import_path3.default.join(installFolder, `.corepack`); - const corepackContent = await import_fs4.default.promises.readFile(corepackFile, `utf8`); - const corepackData = JSON.parse(corepackContent); - log(`Reusing ${locator.name}@${locator.reference} found in ${installFolder}`); - return { - hash: corepackData.hash, - location: installFolder, - bin: corepackData.bin - }; - } catch (err) { - if (isNodeError(err) && err.code !== `ENOENT`) { - throw err; - } - } - let url; - let signatures; - let integrity; - let binPath = null; - if (locatorIsASupportedPackageManager) { - url = spec.url.replace(`{}`, version2); - if (process.env.COREPACK_NPM_REGISTRY) { - const registry = getRegistryFromPackageManagerSpec(spec); - if (registry.type === `npm`) { - ({ tarball: url, signatures, integrity } = await fetchTarballURLAndSignature(registry.package, version2)); - if (registry.bin) { - binPath = registry.bin; - } - } - url = url.replace( - DEFAULT_NPM_REGISTRY_URL, - () => process.env.COREPACK_NPM_REGISTRY - ); - } - } else { - url = decodeURIComponent(version2); - if (process.env.COREPACK_NPM_REGISTRY && url.startsWith(DEFAULT_NPM_REGISTRY_URL)) { - url = url.replace( - DEFAULT_NPM_REGISTRY_URL, - () => process.env.COREPACK_NPM_REGISTRY - ); - } - } - log(`Installing ${locator.name}@${version2} from ${url}`); - const algo = build[0] ?? `sha512`; - const { tmpFolder, outputFile, hash: actualHash } = await download(installTarget, url, algo, binPath); - let bin; - const isSingleFile = outputFile !== null; - if (isSingleFile) { - if (locatorIsASupportedPackageManager && isValidBinList(spec.bin)) { - bin = spec.bin; - } else { - bin = [locator.name]; - } - } else { - if (locatorIsASupportedPackageManager && isValidBinSpec(spec.bin)) { - bin = spec.bin; - } else { - const { name: packageName, bin: packageBin } = require(import_path3.default.join(tmpFolder, `package.json`)); - if (typeof packageBin === `string`) { - bin = { [packageName]: packageBin }; - } else if (isValidBinSpec(packageBin)) { - bin = packageBin; - } else { - throw new Error(`Unable to locate bin in package.json`); - } - } - } - if (!build[1]) { - const registry = getRegistryFromPackageManagerSpec(spec); - if (registry.type === `npm` && !registry.bin && !shouldSkipIntegrityCheck()) { - if (signatures == null || integrity == null) - ({ signatures, integrity } = await fetchTarballURLAndSignature(registry.package, version2)); - verifySignature({ signatures, integrity, packageName: registry.package, version: version2 }); - build[1] = Buffer.from(integrity.slice(`sha512-`.length), `base64`).toString(`hex`); - } - } - if (build[1] && actualHash !== build[1]) - throw new Error(`Mismatch hashes. Expected ${build[1]}, got ${actualHash}`); - const serializedHash = `${algo}.${actualHash}`; - await import_fs4.default.promises.writeFile(import_path3.default.join(tmpFolder, `.corepack`), JSON.stringify({ - locator, - bin, - hash: serializedHash - })); - await import_fs4.default.promises.mkdir(import_path3.default.dirname(installFolder), { recursive: true }); - try { - await renameSafe(tmpFolder, installFolder); - } catch (err) { - if (isNodeError(err) && (isExistError(err) || // On Windows the error code is EPERM so we check if it is a directory - err.code === `EPERM` && (await import_fs4.default.promises.stat(installFolder)).isDirectory())) { - log(`Another instance of corepack installed ${locator.name}@${locator.reference}`); - await import_fs4.default.promises.rm(tmpFolder, { recursive: true, force: true }); - } else { - throw err; - } - } - if (locatorIsASupportedPackageManager && process.env.COREPACK_DEFAULT_TO_LATEST !== `0`) { - const lastKnownGood = await getLastKnownGood(); - const defaultVersion = getLastKnownGoodFromFileContent(lastKnownGood, locator.name); - if (defaultVersion) { - const currentDefault = (0, import_parse3.default)(defaultVersion); - const downloadedVersion = locatorReference; - if (currentDefault.major === downloadedVersion.major && (0, import_lt.default)(currentDefault, downloadedVersion)) { - await activatePackageManager(lastKnownGood, locator); - } - } - } - log(`Download and install of ${locator.name}@${locator.reference} is finished`); - return { - location: installFolder, - bin, - hash: serializedHash - }; -} -async function renameSafe(oldPath, newPath) { - if (process.platform === `win32`) { - await renameUnderWindows(oldPath, newPath); - } else { - await import_fs4.default.promises.rename(oldPath, newPath); - } -} -async function renameUnderWindows(oldPath, newPath) { - const retries = 5; - for (let i = 0; i < retries; i++) { - try { - await import_fs4.default.promises.rename(oldPath, newPath); - break; - } catch (err) { - if (isNodeError(err) && (err.code === `ENOENT` || err.code === `EPERM`) && i < retries - 1) { - await (0, import_promises2.setTimeout)(100 * 2 ** i); - continue; - } else { - throw err; - } - } - } -} -async function runVersion(locator, installSpec, binName, args) { - let binPath = null; - const bin = installSpec.bin ?? installSpec.spec.bin; - if (Array.isArray(bin)) { - if (bin.some((name2) => name2 === binName)) { - const parsedUrl = new URL(installSpec.spec.url); - const ext = import_path3.default.posix.extname(parsedUrl.pathname); - if (ext === `.js`) { - binPath = import_path3.default.join(installSpec.location, import_path3.default.posix.basename(parsedUrl.pathname)); - } - } - } else { - for (const [name2, dest] of Object.entries(bin)) { - if (name2 === binName) { - binPath = import_path3.default.join(installSpec.location, dest); - break; - } - } - } - if (!binPath) - throw new Error(`Assertion failed: Unable to locate path for bin '${binName}'`); - if (!import_module.default.enableCompileCache) { - if (locator.name !== `npm` || (0, import_lt.default)(locator.reference, `9.7.0`)) { - await Promise.resolve().then(() => __toESM(require_v8_compile_cache())); - } - } - process.env.COREPACK_ROOT = import_path3.default.dirname(require.resolve("corepack/package.json")); - process.argv = [ - process.execPath, - binPath, - ...args - ]; - process.execArgv = []; - process.mainModule = void 0; - process.nextTick(import_module.default.runMain, binPath); - if (import_module.default.flushCompileCache) { - setImmediate(import_module.default.flushCompileCache); - } -} -function shouldSkipIntegrityCheck() { - return process.env.COREPACK_INTEGRITY_KEYS === `` || process.env.COREPACK_INTEGRITY_KEYS === `0`; -} - -// sources/semverUtils.ts -var import_range2 = __toESM(require_range()); -var import_semver2 = __toESM(require_semver()); -function satisfiesWithPrereleases(version2, range, loose = false) { - let semverRange; - try { - semverRange = new import_range2.default(range, loose); - } catch (err) { - return false; - } - if (!version2) - return false; - let semverVersion; - try { - semverVersion = new import_semver2.default(version2, semverRange.loose); - if (semverVersion.prerelease) { - semverVersion.prerelease = []; - } - } catch (err) { - return false; - } - return semverRange.set.some((comparatorSet) => { - for (const comparator of comparatorSet) - if (comparator.semver.prerelease) - comparator.semver.prerelease = []; - return comparatorSet.every((comparator) => { - return comparator.test(semverVersion); - }); - }); -} - -// sources/specUtils.ts -var import_fs5 = __toESM(require("fs")); -var import_path4 = __toESM(require("path")); -var import_satisfies = __toESM(require_satisfies()); -var import_valid = __toESM(require_valid()); -var import_valid2 = __toESM(require_valid2()); -var import_util = require("util"); - -// sources/types.ts -var SupportedPackageManagers = /* @__PURE__ */ ((SupportedPackageManagers3) => { - SupportedPackageManagers3["Npm"] = `npm`; - SupportedPackageManagers3["Pnpm"] = `pnpm`; - SupportedPackageManagers3["Yarn"] = `yarn`; - return SupportedPackageManagers3; -})(SupportedPackageManagers || {}); -var SupportedPackageManagerSet = new Set( - Object.values(SupportedPackageManagers) -); -var SupportedPackageManagerSetWithoutNpm = new Set( - Object.values(SupportedPackageManagers) -); -SupportedPackageManagerSetWithoutNpm.delete("npm" /* Npm */); -function isSupportedPackageManager(value) { - return SupportedPackageManagerSet.has(value); -} - -// sources/specUtils.ts -var nodeModulesRegExp = /[\\/]node_modules[\\/](@[^\\/]*[\\/])?([^@\\/][^\\/]*)$/; -function parseSpec(raw2, source, { enforceExactVersion = true } = {}) { - if (typeof raw2 !== `string`) - throw new UsageError(`Invalid package manager specification in ${source}; expected a string`); - const atIndex = raw2.indexOf(`@`); - if (atIndex === -1 || atIndex === raw2.length - 1) { - if (enforceExactVersion) - throw new UsageError(`No version specified for ${raw2} in "packageManager" of ${source}`); - const name3 = atIndex === -1 ? raw2 : raw2.slice(0, -1); - if (!isSupportedPackageManager(name3)) - throw new UsageError(`Unsupported package manager specification (${name3})`); - return { - name: name3, - range: `*` - }; - } - const name2 = raw2.slice(0, atIndex); - const range = raw2.slice(atIndex + 1); - const isURL = URL.canParse(range); - if (!isURL) { - if (enforceExactVersion && !(0, import_valid.default)(range)) - throw new UsageError(`Invalid package manager specification in ${source} (${raw2}); expected a semver version${enforceExactVersion ? `` : `, range, or tag`}`); - if (!isSupportedPackageManager(name2)) { - throw new UsageError(`Unsupported package manager specification (${raw2})`); - } - } else if (isSupportedPackageManager(name2) && process.env.COREPACK_ENABLE_UNSAFE_CUSTOM_URLS !== `1`) { - throw new UsageError(`Illegal use of URL for known package manager. Instead, select a specific version, or set COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 in your environment (${raw2})`); - } - return { - name: name2, - range - }; -} -function warnOrThrow(errorMessage, onFail) { - switch (onFail) { - case `ignore`: - break; - case `error`: - case void 0: - throw new UsageError(errorMessage); - default: - console.warn(`! Corepack validation warning: ${errorMessage}`); - } -} -function parsePackageJSON(packageJSONContent) { - const { packageManager: pm } = packageJSONContent; - if (packageJSONContent.devEngines?.packageManager != null) { - const { packageManager } = packageJSONContent.devEngines; - if (typeof packageManager !== `object`) { - console.warn(`! Corepack only supports objects as valid value for devEngines.packageManager. The current value (${JSON.stringify(packageManager)}) will be ignored.`); - return pm; - } - if (Array.isArray(packageManager)) { - console.warn(`! Corepack does not currently support array values for devEngines.packageManager`); - return pm; - } - const { name: name2, version: version2, onFail } = packageManager; - if (typeof name2 !== `string` || name2.includes(`@`)) { - warnOrThrow(`The value of devEngines.packageManager.name ${JSON.stringify(name2)} is not a supported string value`, onFail); - return pm; - } - if (version2 != null && (typeof version2 !== `string` || !(0, import_valid2.default)(version2))) { - warnOrThrow(`The value of devEngines.packageManager.version ${JSON.stringify(version2)} is not a valid semver range`, onFail); - return pm; - } - log(`devEngines.packageManager defines that ${name2}@${version2} is the local package manager`); - if (pm) { - if (!pm.startsWith?.(`${name2}@`)) - warnOrThrow(`"packageManager" field is set to ${JSON.stringify(pm)} which does not match the "devEngines.packageManager" field set to ${JSON.stringify(name2)}`, onFail); - else if (version2 != null && !(0, import_satisfies.default)(pm.slice(packageManager.name.length + 1), version2)) - warnOrThrow(`"packageManager" field is set to ${JSON.stringify(pm)} which does not match the value defined in "devEngines.packageManager" for ${JSON.stringify(name2)} of ${JSON.stringify(version2)}`, onFail); - return pm; - } - return `${name2}@${version2 ?? `*`}`; - } - return pm; -} -async function setLocalPackageManager(cwd, info) { - const lookup = await loadSpec(cwd); - const range = `range` in lookup && lookup.range; - if (range) { - if (info.locator.name !== range.name || !(0, import_satisfies.default)(info.locator.reference, range.range)) { - warnOrThrow(`The requested version of ${info.locator.name}@${info.locator.reference} does not match the devEngines specification (${range.name}@${range.range})`, range.onFail); - } - } - const content = lookup.type !== `NoProject` ? await import_fs5.default.promises.readFile(lookup.target, `utf8`) : ``; - const { data, indent } = readPackageJson(content); - const previousPackageManager = data.packageManager ?? (range ? `${range.name}@${range.range}` : `unknown`); - data.packageManager = `${info.locator.name}@${info.locator.reference}`; - const newContent = normalizeLineEndings(content, `${JSON.stringify(data, null, indent)} -`); - await import_fs5.default.promises.writeFile(lookup.target, newContent, `utf8`); - return { - previousPackageManager - }; -} -async function loadSpec(initialCwd) { - let nextCwd = initialCwd; - let currCwd = ``; - let selection = null; - while (nextCwd !== currCwd && (!selection || !selection.data.packageManager)) { - currCwd = nextCwd; - nextCwd = import_path4.default.dirname(currCwd); - if (nodeModulesRegExp.test(currCwd)) - continue; - const manifestPath = import_path4.default.join(currCwd, `package.json`); - log(`Checking ${manifestPath}`); - let content; - try { - content = await import_fs5.default.promises.readFile(manifestPath, `utf8`); - } catch (err) { - if (err?.code === `ENOENT`) continue; - throw err; - } - let data; - try { - data = JSON.parse(content); - } catch { - } - if (typeof data !== `object` || data === null) - throw new UsageError(`Invalid package.json in ${import_path4.default.relative(initialCwd, manifestPath)}`); - let localEnv; - const envFilePath2 = import_path4.default.resolve(currCwd, process.env.COREPACK_ENV_FILE ?? `.corepack.env`); - if (process.env.COREPACK_ENV_FILE == `0`) { - log(`Skipping env file as configured with COREPACK_ENV_FILE`); - localEnv = process.env; - } else if (typeof import_util.parseEnv !== `function`) { - log(`Skipping env file as it is not supported by the current version of Node.js`); - localEnv = process.env; - } else { - log(`Checking ${envFilePath2}`); - try { - localEnv = { - ...Object.fromEntries(Object.entries((0, import_util.parseEnv)(await import_fs5.default.promises.readFile(envFilePath2, `utf8`))).filter((e) => e[0].startsWith(`COREPACK_`))), - ...process.env - }; - log(`Successfully loaded env file found at ${envFilePath2}`); - } catch (err) { - if (err?.code !== `ENOENT`) - throw err; - log(`No env file found at ${envFilePath2}`); - localEnv = process.env; - } - } - selection = { data, manifestPath, localEnv, envFilePath: envFilePath2 }; - } - if (selection === null) - return { type: `NoProject`, target: import_path4.default.join(initialCwd, `package.json`) }; - let envFilePath; - if (selection.localEnv !== process.env) { - envFilePath = selection.envFilePath; - process.env = selection.localEnv; - } - const rawPmSpec = parsePackageJSON(selection.data); - if (typeof rawPmSpec === `undefined`) - return { type: `NoSpec`, target: selection.manifestPath }; - log(`${selection.manifestPath} defines ${rawPmSpec} as local package manager`); - return { - type: `Found`, - target: selection.manifestPath, - envFilePath, - range: selection.data.devEngines?.packageManager?.version && { - name: selection.data.devEngines.packageManager.name, - range: selection.data.devEngines.packageManager.version, - onFail: selection.data.devEngines.packageManager.onFail - }, - // Lazy-loading it so we do not throw errors on commands that do not need valid spec. - getSpec: ({ enforceExactVersion = true } = {}) => parseSpec(rawPmSpec, import_path4.default.relative(initialCwd, selection.manifestPath), { enforceExactVersion }) - }; -} - -// sources/Engine.ts -function getLastKnownGoodFilePath() { - const lkg = import_path5.default.join(getCorepackHomeFolder(), `lastKnownGood.json`); - log(`LastKnownGood file would be located at ${lkg}`); - return lkg; -} -async function getLastKnownGood() { - let raw2; - try { - raw2 = await import_fs6.default.promises.readFile(getLastKnownGoodFilePath(), `utf8`); - } catch (err) { - if (err?.code === `ENOENT`) { - log(`No LastKnownGood version found in Corepack home.`); - return {}; - } - throw err; - } - try { - const parsed = JSON.parse(raw2); - if (!parsed) { - log(`Invalid LastKnowGood file in Corepack home (JSON parsable, but falsy)`); - return {}; - } - if (typeof parsed !== `object`) { - log(`Invalid LastKnowGood file in Corepack home (JSON parsable, but non-object)`); - return {}; - } - Object.entries(parsed).forEach(([key, value]) => { - if (typeof value !== `string`) { - log(`Ignoring key ${key} in LastKnownGood file as its value is not a string`); - delete parsed[key]; - } - }); - return parsed; - } catch { - log(`Invalid LastKnowGood file in Corepack home (maybe not JSON parsable)`); - return {}; - } -} -async function createLastKnownGoodFile(lastKnownGood) { - const content = `${JSON.stringify(lastKnownGood, null, 2)} -`; - await import_fs6.default.promises.mkdir(getCorepackHomeFolder(), { recursive: true }); - await import_fs6.default.promises.writeFile(getLastKnownGoodFilePath(), content, `utf8`); -} -function getLastKnownGoodFromFileContent(lastKnownGood, packageManager) { - if (Object.hasOwn(lastKnownGood, packageManager)) - return lastKnownGood[packageManager]; - return void 0; -} -async function activatePackageManager(lastKnownGood, locator) { - if (lastKnownGood[locator.name] === locator.reference) { - log(`${locator.name}@${locator.reference} is already Last Known Good version`); - return; - } - lastKnownGood[locator.name] = locator.reference; - log(`Setting ${locator.name}@${locator.reference} as Last Known Good version`); - await createLastKnownGoodFile(lastKnownGood); -} -var Engine = class { - constructor(config = config_default) { - this.config = config; - } - getPackageManagerFor(binaryName) { - for (const packageManager of SupportedPackageManagerSet) { - for (const rangeDefinition of Object.values(this.config.definitions[packageManager].ranges)) { - const bins = Array.isArray(rangeDefinition.bin) ? rangeDefinition.bin : Object.keys(rangeDefinition.bin); - if (bins.includes(binaryName)) { - return packageManager; - } - } - } - return null; - } - getPackageManagerSpecFor(locator) { - if (!isSupportedPackageManagerLocator(locator)) { - const url = `${locator.reference}`; - return { - url, - bin: void 0, - // bin will be set later - registry: { - type: `url`, - url, - fields: { - tags: ``, - versions: `` - } - } - }; - } - const definition = this.config.definitions[locator.name]; - if (typeof definition === `undefined`) - throw new UsageError(`This package manager (${locator.name}) isn't supported by this corepack build`); - const ranges = Object.keys(definition.ranges).reverse(); - const range = ranges.find((range2) => satisfiesWithPrereleases(locator.reference, range2)); - if (typeof range === `undefined`) - throw new Error(`Assertion failed: Specified resolution (${locator.reference}) isn't supported by any of ${ranges.join(`, `)}`); - return definition.ranges[range]; - } - getBinariesFor(name2) { - const binNames = /* @__PURE__ */ new Set(); - for (const rangeDefinition of Object.values(this.config.definitions[name2].ranges)) { - const bins = Array.isArray(rangeDefinition.bin) ? rangeDefinition.bin : Object.keys(rangeDefinition.bin); - for (const name3 of bins) { - binNames.add(name3); - } - } - return binNames; - } - async getDefaultDescriptors() { - const locators = []; - for (const name2 of SupportedPackageManagerSet) - locators.push({ name: name2, range: await this.getDefaultVersion(name2) }); - return locators; - } - async getDefaultVersion(packageManager) { - const definition = this.config.definitions[packageManager]; - if (typeof definition === `undefined`) - throw new UsageError(`This package manager (${packageManager}) isn't supported by this corepack build`); - const lastKnownGood = await getLastKnownGood(); - const lastKnownGoodForThisPackageManager = getLastKnownGoodFromFileContent(lastKnownGood, packageManager); - if (lastKnownGoodForThisPackageManager) { - log(`Search for default version: Found ${packageManager}@${lastKnownGoodForThisPackageManager} in LastKnownGood file`); - return lastKnownGoodForThisPackageManager; - } - if (import_process3.default.env.COREPACK_DEFAULT_TO_LATEST === `0`) { - log(`Search for default version: As defined in environment, defaulting to internal config ${packageManager}@${definition.default}`); - return definition.default; - } - const reference = await fetchLatestStableVersion2(definition.fetchLatestFrom); - log(`Search for default version: found in remote registry ${packageManager}@${reference}`); - try { - await activatePackageManager(lastKnownGood, { - name: packageManager, - reference - }); - } catch { - log(`Search for default version: could not activate registry version`); - } - return reference; - } - async activatePackageManager(locator) { - const lastKnownGood = await getLastKnownGood(); - await activatePackageManager(lastKnownGood, locator); - } - async ensurePackageManager(locator) { - const spec = this.getPackageManagerSpecFor(locator); - const packageManagerInfo = await installVersion(getInstallFolder(), locator, { - spec - }); - const noHashReference = locator.reference.replace(/\+.*/, ``); - const fixedHashReference = `${noHashReference}+${packageManagerInfo.hash}`; - const fixedHashLocator = { - name: locator.name, - reference: fixedHashReference - }; - return { - ...packageManagerInfo, - locator: fixedHashLocator, - spec - }; - } - /** - * Locates the active project's package manager specification. - * - * If the specification exists but doesn't match the active package manager, - * an error is thrown to prevent users from using the wrong package manager, - * which would lead to inconsistent project layouts. - * - * If the project doesn't include a specification file, we just assume that - * whatever the user uses is exactly what they want to use. Since the version - * isn't specified, we fallback on known good versions. - * - * Finally, if the project doesn't exist at all, we ask the user whether they - * want to create one in the current project. If they do, we initialize a new - * project using the default package managers, and configure it so that we - * don't need to ask again in the future. - */ - async findProjectSpec(initialCwd, locator, { transparent = false, binaryVersion } = {}) { - const fallbackDescriptor = { name: locator.name, range: `${locator.reference}` }; - if (import_process3.default.env.COREPACK_ENABLE_PROJECT_SPEC === `0`) { - if (typeof locator.reference === `function`) - fallbackDescriptor.range = await locator.reference(); - return fallbackDescriptor; - } - if (import_process3.default.env.COREPACK_ENABLE_STRICT === `0`) - transparent = true; - while (true) { - const result = await loadSpec(initialCwd); - switch (result.type) { - case `NoProject`: { - if (typeof locator.reference === `function`) - fallbackDescriptor.range = await locator.reference(); - log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} as no project manifest were found`); - return fallbackDescriptor; - } - case `NoSpec`: { - if (typeof locator.reference === `function`) - fallbackDescriptor.range = await locator.reference(); - if (import_process3.default.env.COREPACK_ENABLE_AUTO_PIN === `1`) { - const resolved = await this.resolveDescriptor(fallbackDescriptor, { allowTags: true }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${fallbackDescriptor.range}' to a valid ${fallbackDescriptor.name} release`); - const installSpec = await this.ensurePackageManager(resolved); - console.error(`! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing ${installSpec.locator.name}@${installSpec.locator.reference}.`); - console.error(`! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager`); - console.error(); - await setLocalPackageManager(import_path5.default.dirname(result.target), installSpec); - } - log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in the absence of "packageManager" field in ${result.target}`); - return fallbackDescriptor; - } - case `Found`: { - const spec = result.getSpec({ enforceExactVersion: !binaryVersion }); - if (spec.name !== locator.name) { - if (transparent) { - if (typeof locator.reference === `function`) - fallbackDescriptor.range = await locator.reference(); - log(`Falling back to ${fallbackDescriptor.name}@${fallbackDescriptor.range} in a ${spec.name}@${spec.range} project`); - return fallbackDescriptor; - } else { - throw new UsageError(`This project is configured to use ${spec.name} because ${result.target} has a "packageManager" field`); - } - } else { - log(`Using ${spec.name}@${spec.range} as defined in project manifest ${result.target}`); - return spec; - } - } - } - } - } - async executePackageManagerRequest({ packageManager, binaryName, binaryVersion }, { cwd, args }) { - let fallbackLocator = { - name: binaryName, - reference: void 0 - }; - let isTransparentCommand = false; - if (packageManager != null) { - const defaultVersion = binaryVersion || (() => this.getDefaultVersion(packageManager)); - const definition = this.config.definitions[packageManager]; - for (const transparentPath of definition.transparent.commands) { - if (transparentPath[0] === binaryName && transparentPath.slice(1).every((segment, index) => segment === args[index])) { - isTransparentCommand = true; - break; - } - } - const fallbackReference = isTransparentCommand ? definition.transparent.default ?? defaultVersion : defaultVersion; - fallbackLocator = { - name: packageManager, - reference: fallbackReference - }; - } - const descriptor = await this.findProjectSpec(cwd, fallbackLocator, { transparent: isTransparentCommand, binaryVersion }); - if (binaryVersion) - descriptor.range = binaryVersion; - const resolved = await this.resolveDescriptor(descriptor, { allowTags: true }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); - const installSpec = await this.ensurePackageManager(resolved); - return await runVersion(resolved, installSpec, binaryName, args); - } - async resolveDescriptor(descriptor, { allowTags = false, useCache = true } = {}) { - if (!isSupportedPackageManagerDescriptor(descriptor)) { - if (import_process3.default.env.COREPACK_ENABLE_UNSAFE_CUSTOM_URLS !== `1` && isSupportedPackageManager(descriptor.name)) - throw new UsageError(`Illegal use of URL for known package manager. Instead, select a specific version, or set COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 in your environment (${descriptor.name}@${descriptor.range})`); - return { - name: descriptor.name, - reference: descriptor.range - }; - } - const definition = this.config.definitions[descriptor.name]; - if (typeof definition === `undefined`) - throw new UsageError(`This package manager (${descriptor.name}) isn't supported by this corepack build`); - let finalDescriptor = descriptor; - if (!(0, import_valid3.default)(descriptor.range) && !(0, import_valid4.default)(descriptor.range)) { - if (!allowTags) - throw new UsageError(`Packages managers can't be referenced via tags in this context`); - const ranges = Object.keys(definition.ranges); - const tagRange = ranges[ranges.length - 1]; - const packageManagerSpec = definition.ranges[tagRange]; - const registry = getRegistryFromPackageManagerSpec(packageManagerSpec); - const tags = await fetchAvailableTags2(registry); - if (!Object.hasOwn(tags, descriptor.range)) - throw new UsageError(`Tag not found (${descriptor.range})`); - finalDescriptor = { - name: descriptor.name, - range: tags[descriptor.range] - }; - } - const cachedVersion = await findInstalledVersion(getInstallFolder(), finalDescriptor); - if (cachedVersion !== null && useCache) - return { name: finalDescriptor.name, reference: cachedVersion }; - if ((0, import_valid3.default)(finalDescriptor.range)) - return { name: finalDescriptor.name, reference: finalDescriptor.range }; - const versions = await Promise.all(Object.keys(definition.ranges).map(async (range) => { - const packageManagerSpec = definition.ranges[range]; - const registry = getRegistryFromPackageManagerSpec(packageManagerSpec); - const versions2 = await fetchAvailableVersions2(registry); - return versions2.filter((version2) => satisfiesWithPrereleases(version2, finalDescriptor.range)); - })); - const highestVersion = [...new Set(versions.flat())].sort(import_rcompare.default); - if (highestVersion.length === 0) - return null; - return { name: finalDescriptor.name, reference: highestVersion[0] }; - } -}; - -// sources/commands/Cache.ts -var import_fs7 = __toESM(require("fs")); -var CacheCommand = class extends Command { - static paths = [ - [`cache`, `clean`], - [`cache`, `clear`] - ]; - static usage = Command.Usage({ - description: `Cleans Corepack cache`, - details: ` - Removes Corepack cache directory from your local disk. - ` - }); - async execute() { - await import_fs7.default.promises.rm(getInstallFolder(), { recursive: true, force: true }); - } -}; - -// sources/commands/Disable.ts -var import_fs8 = __toESM(require("fs")); -var import_path6 = __toESM(require("path")); -var import_which = __toESM(require_lib()); -var DisableCommand = class extends Command { - static paths = [ - [`disable`] - ]; - static usage = Command.Usage({ - description: `Remove the Corepack shims from the install directory`, - details: ` - When run, this command will remove the shims for the specified package managers from the install directory, or all shims if no parameters are passed. - - By default it will locate the install directory by running the equivalent of \`which corepack\`, but this can be tweaked by explicitly passing the install directory via the \`--install-directory\` flag. - `, - examples: [[ - `Disable all shims, removing them if they're next to the \`coreshim\` binary`, - `$0 disable` - ], [ - `Disable all shims, removing them from the specified directory`, - `$0 disable --install-directory /path/to/bin` - ], [ - `Disable the Yarn shim only`, - `$0 disable yarn` - ]] - }); - installDirectory = options_exports.String(`--install-directory`, { - description: `Where the shims are located` - }); - names = options_exports.Rest(); - async execute() { - let installDirectory = this.installDirectory; - if (typeof installDirectory === `undefined`) - installDirectory = import_path6.default.dirname(await (0, import_which.default)(`corepack`)); - const names = this.names.length === 0 ? SupportedPackageManagerSetWithoutNpm : this.names; - const allBinNames = []; - for (const name2 of new Set(names)) { - if (!isSupportedPackageManager(name2)) - throw new UsageError(`Invalid package manager name '${name2}'`); - const binNames = this.context.engine.getBinariesFor(name2); - allBinNames.push(...binNames); - } - const removeLink = process.platform === `win32` ? (binName) => this.removeWin32Link(installDirectory, binName) : (binName) => this.removePosixLink(installDirectory, binName); - await Promise.all(allBinNames.map(removeLink)); - } - async removePosixLink(installDirectory, binName) { - const file = import_path6.default.join(installDirectory, binName); - try { - if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs8.default.promises.realpath(file))) { - console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`); - return; - } - await import_fs8.default.promises.unlink(file); - } catch (err) { - if (err.code !== `ENOENT`) { - throw err; - } - } - } - async removeWin32Link(installDirectory, binName) { - for (const ext of [``, `.ps1`, `.cmd`]) { - const file = import_path6.default.join(installDirectory, `${binName}${ext}`); - try { - await import_fs8.default.promises.unlink(file); - } catch (err) { - if (err.code !== `ENOENT`) { - throw err; - } - } - } - } -}; - -// sources/commands/Enable.ts -var import_cmd_shim = __toESM(require_cmd_shim()); -var import_fs9 = __toESM(require("fs")); -var import_path7 = __toESM(require("path")); -var import_which2 = __toESM(require_lib()); -var EnableCommand = class extends Command { - static paths = [ - [`enable`] - ]; - static usage = Command.Usage({ - description: `Add the Corepack shims to the install directory`, - details: ` - When run, this command will check whether the shims for the specified package managers can be found with the correct values inside the install directory. If not, or if they don't exist, they will be created. - - By default it will locate the install directory by running the equivalent of \`which corepack\`, but this can be tweaked by explicitly passing the install directory via the \`--install-directory\` flag. - `, - examples: [[ - `Enable all shims, putting them next to the \`corepack\` binary`, - `$0 enable` - ], [ - `Enable all shims, putting them in the specified directory`, - `$0 enable --install-directory /path/to/folder` - ], [ - `Enable the Yarn shim only`, - `$0 enable yarn` - ]] - }); - installDirectory = options_exports.String(`--install-directory`, { - description: `Where the shims are to be installed` - }); - names = options_exports.Rest(); - async execute() { - let installDirectory = this.installDirectory; - if (typeof installDirectory === `undefined`) - installDirectory = import_path7.default.dirname(await (0, import_which2.default)(`corepack`)); - installDirectory = import_fs9.default.realpathSync(installDirectory); - const manifestPath = require.resolve("corepack/package.json"); - const distFolder = import_path7.default.join(import_path7.default.dirname(manifestPath), `dist`); - if (!import_fs9.default.existsSync(distFolder)) - throw new Error(`Assertion failed: The stub folder doesn't exist`); - const names = this.names.length === 0 ? SupportedPackageManagerSetWithoutNpm : this.names; - const allBinNames = []; - for (const name2 of new Set(names)) { - if (!isSupportedPackageManager(name2)) - throw new UsageError(`Invalid package manager name '${name2}'`); - const binNames = this.context.engine.getBinariesFor(name2); - allBinNames.push(...binNames); - } - const generateLink = process.platform === `win32` ? (binName) => this.generateWin32Link(installDirectory, distFolder, binName) : (binName) => this.generatePosixLink(installDirectory, distFolder, binName); - await Promise.all(allBinNames.map(generateLink)); - } - async generatePosixLink(installDirectory, distFolder, binName) { - const file = import_path7.default.join(installDirectory, binName); - const symlink = import_path7.default.relative(installDirectory, import_path7.default.join(distFolder, `${binName}.js`)); - const stats = import_fs9.default.lstatSync(file, { throwIfNoEntry: false }); - if (stats) { - if (stats.isSymbolicLink()) { - const currentSymlink = await import_fs9.default.promises.readlink(file); - if (binName.includes(`yarn`) && isYarnSwitchPath(await import_fs9.default.promises.realpath(file))) { - console.warn(`${binName} is already installed in ${file} and points to a Yarn Switch install - skipping`); - return; - } - if (currentSymlink === symlink) { - return; - } - } - await import_fs9.default.promises.unlink(file); - } - await import_fs9.default.promises.symlink(symlink, file); - } - async generateWin32Link(installDirectory, distFolder, binName) { - const file = import_path7.default.join(installDirectory, binName); - await (0, import_cmd_shim.default)(import_path7.default.join(distFolder, `${binName}.js`), file, { - createCmdFile: true - }); - } -}; - -// sources/commands/InstallGlobal.ts -var import_fs10 = __toESM(require("fs")); -var import_path8 = __toESM(require("path")); - -// sources/commands/Base.ts -var BaseCommand = class extends Command { - async resolvePatternsToDescriptors({ patterns }) { - const resolvedSpecs = patterns.map((pattern) => parseSpec(pattern, `CLI arguments`, { enforceExactVersion: false })); - if (resolvedSpecs.length === 0) { - const lookup = await loadSpec(this.context.cwd); - switch (lookup.type) { - case `NoProject`: - throw new UsageError(`Couldn't find a project in the local directory - please specify the package manager to pack, or run this command from a valid project`); - case `NoSpec`: - throw new UsageError(`The local project doesn't feature a 'packageManager' field nor a 'devEngines.packageManager' field - please specify the package manager to pack, or update the manifest to reference it`); - default: { - return [lookup.range ?? lookup.getSpec()]; - } - } - } - return resolvedSpecs; - } - async setAndInstallLocalPackageManager(info) { - const { - previousPackageManager - } = await setLocalPackageManager(this.context.cwd, info); - const command = this.context.engine.getPackageManagerSpecFor(info.locator).commands?.use ?? null; - if (command === null) - return 0; - process.env.COREPACK_MIGRATE_FROM = previousPackageManager; - this.context.stdout.write(` -`); - const [binaryName, ...args] = command; - return await runVersion(info.locator, info, binaryName, args); - } -}; - -// sources/commands/InstallGlobal.ts -var InstallGlobalCommand = class extends BaseCommand { - static paths = [ - [`install`] - ]; - static usage = Command.Usage({ - description: `Install package managers on the system`, - details: ` - Download the selected package managers and install them on the system. - - Package managers thus installed will be configured as the new default when calling their respective binaries outside of projects defining the 'packageManager' field. - `, - examples: [[ - `Install the latest version of Yarn 1.x and make it globally available`, - `corepack install -g yarn@^1` - ], [ - `Install the latest version of pnpm, and make it globally available`, - `corepack install -g pnpm` - ]] - }); - global = options_exports.Boolean(`-g,--global`, { - required: true - }); - cacheOnly = options_exports.Boolean(`--cache-only`, false, { - description: `If true, the package managers will only be cached, not set as new defaults` - }); - args = options_exports.Rest(); - async execute() { - if (this.args.length === 0) - throw new UsageError(`No package managers specified`); - await Promise.all(this.args.map((arg) => { - if (arg.endsWith(`.tgz`)) { - return this.installFromTarball(import_path8.default.resolve(this.context.cwd, arg)); - } else { - return this.installFromDescriptor(parseSpec(arg, `CLI arguments`, { enforceExactVersion: false })); - } - })); - } - log(locator) { - if (this.cacheOnly) { - this.context.stdout.write(`Adding ${locator.name}@${locator.reference} to the cache... -`); - } else { - this.context.stdout.write(`Installing ${locator.name}@${locator.reference}... -`); - } - } - async installFromDescriptor(descriptor) { - const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true, useCache: false }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); - this.log(resolved); - await this.context.engine.ensurePackageManager(resolved); - if (!this.cacheOnly) { - await this.context.engine.activatePackageManager(resolved); - } - } - async installFromTarball(p) { - const installFolder = getInstallFolder(); - const archiveEntries = /* @__PURE__ */ new Map(); - const { list: tarT } = await Promise.resolve().then(() => (init_list(), list_exports)); - let hasShortEntries = false; - await tarT({ file: p, onentry: (entry) => { - const segments = entry.path.split(/\//g); - if (segments.length > 0 && segments[segments.length - 1] !== `.corepack`) - return; - if (segments.length < 3) { - hasShortEntries = true; - } else { - let references = archiveEntries.get(segments[0]); - if (typeof references === `undefined`) - archiveEntries.set(segments[0], references = /* @__PURE__ */ new Set()); - references.add(segments[1]); - } - } }); - if (hasShortEntries || archiveEntries.size < 1) - throw new UsageError(`Invalid archive format; did it get generated by 'corepack pack'?`); - const { extract: tarX } = await Promise.resolve().then(() => (init_extract(), extract_exports)); - for (const [name2, references] of archiveEntries) { - for (const reference of references) { - if (!isSupportedPackageManager(name2)) - throw new UsageError(`Unsupported package manager '${name2}'`); - this.log({ name: name2, reference }); - await import_fs10.default.promises.mkdir(installFolder, { recursive: true }); - await tarX({ file: p, cwd: installFolder }, [`${name2}/${reference}`]); - if (!this.cacheOnly) { - await this.context.engine.activatePackageManager({ name: name2, reference }); - } - } - } - } -}; - -// sources/commands/InstallLocal.ts -var InstallLocalCommand = class extends BaseCommand { - static paths = [ - [`install`] - ]; - static usage = Command.Usage({ - description: `Install the package manager configured in the local project`, - details: ` - Download and install the package manager configured in the local project. This command doesn't change the global version used when running the package manager from outside the project (use the \`-g,--global\` flag if you wish to do this). - `, - examples: [[ - `Install the project's package manager in the cache`, - `corepack install` - ]] - }); - async execute() { - const [descriptor] = await this.resolvePatternsToDescriptors({ - patterns: [] - }); - const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); - this.context.stdout.write(`Adding ${resolved.name}@${resolved.reference} to the cache... -`); - await this.context.engine.ensurePackageManager(resolved); - } -}; - -// sources/commands/Pack.ts -var import_promises3 = require("fs/promises"); -var import_path11 = __toESM(require("path")); -var PackCommand = class extends BaseCommand { - static paths = [ - [`pack`] - ]; - static usage = Command.Usage({ - description: `Store package managers in a tarball`, - details: ` - Download the selected package managers and store them inside a tarball suitable for use with \`corepack install -g\`. - `, - examples: [[ - `Pack the package manager defined in the package.json file`, - `corepack pack` - ], [ - `Pack the latest version of Yarn 1.x inside a file named corepack.tgz`, - `corepack pack yarn@^1` - ]] - }); - json = options_exports.Boolean(`--json`, false, { - description: `If true, the path to the generated tarball will be printed on stdout` - }); - output = options_exports.String(`-o,--output`, { - description: `Where the tarball should be generated; by default "corepack.tgz"` - }); - patterns = options_exports.Rest(); - async execute() { - const descriptors = await this.resolvePatternsToDescriptors({ - patterns: this.patterns - }); - const installLocations = []; - for (const descriptor of descriptors) { - const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true, useCache: false }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); - this.context.stdout.write(`Adding ${resolved.name}@${resolved.reference} to the cache... -`); - const packageManagerInfo = await this.context.engine.ensurePackageManager(resolved); - await this.context.engine.activatePackageManager(packageManagerInfo.locator); - installLocations.push(packageManagerInfo.location); - } - const baseInstallFolder = getInstallFolder(); - const outputPath = import_path11.default.resolve(this.context.cwd, this.output ?? `corepack.tgz`); - if (!this.json) { - this.context.stdout.write(` -`); - this.context.stdout.write(`Packing the selected tools in ${import_path11.default.basename(outputPath)}... -`); - } - const { create: tarC } = await Promise.resolve().then(() => (init_create(), create_exports)); - await (0, import_promises3.mkdir)(baseInstallFolder, { recursive: true }); - await tarC({ gzip: true, cwd: baseInstallFolder, file: import_path11.default.resolve(outputPath) }, installLocations.map((location) => { - return import_path11.default.relative(baseInstallFolder, location); - })); - if (this.json) { - this.context.stdout.write(`${JSON.stringify(outputPath)} -`); - } else { - this.context.stdout.write(`All done! -`); - } - } -}; - -// sources/commands/Up.ts -var import_major = __toESM(require_major()); -var import_valid5 = __toESM(require_valid()); -var import_valid6 = __toESM(require_valid2()); -var UpCommand = class extends BaseCommand { - static paths = [ - [`up`] - ]; - static usage = Command.Usage({ - description: `Update the package manager used in the current project`, - details: ` - Retrieve the latest available version for the current major release line - of the package manager used in the local project, and update the project - to use it. - - Unlike \`corepack use\` this command doesn't take a package manager name - nor a version range, as it will always select the latest available - version from the same major line. Should you need to upgrade to a new - major, use an explicit \`corepack use '{name}@*'\` call. - `, - examples: [[ - `Configure the project to use the latest Yarn release`, - `corepack up` - ]] - }); - async execute() { - const [descriptor] = await this.resolvePatternsToDescriptors({ - patterns: [] - }); - if (!(0, import_valid5.default)(descriptor.range) && !(0, import_valid6.default)(descriptor.range)) - throw new UsageError(`The 'corepack up' command can only be used when your project's packageManager field is set to a semver version or semver range`); - const resolved = await this.context.engine.resolveDescriptor(descriptor, { useCache: false }); - if (!resolved) - throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); - const majorVersion = (0, import_major.default)(resolved.reference); - const majorDescriptor = { name: descriptor.name, range: `^${majorVersion}.0.0` }; - const highestVersion = await this.context.engine.resolveDescriptor(majorDescriptor, { useCache: false }); - if (!highestVersion) - throw new UsageError(`Failed to find the highest release for ${descriptor.name} ${majorVersion}.x`); - this.context.stdout.write(`Installing ${highestVersion.name}@${highestVersion.reference} in the project... -`); - const packageManagerInfo = await this.context.engine.ensurePackageManager(highestVersion); - await this.setAndInstallLocalPackageManager(packageManagerInfo); - } -}; - -// sources/commands/Use.ts -var UseCommand = class extends BaseCommand { - static paths = [ - [`use`] - ]; - static usage = Command.Usage({ - description: `Define the package manager to use for the current project`, - details: ` - When run, this command will retrieve the latest release matching the - provided descriptor, assign it to the project's package.json file, and - automatically perform an install. - `, - examples: [[ - `Configure the project to use the latest Yarn release`, - `corepack use yarn` - ]] - }); - pattern = options_exports.String(); - async execute() { - const [descriptor] = await this.resolvePatternsToDescriptors({ - patterns: [this.pattern] - }); - const resolved = await this.context.engine.resolveDescriptor(descriptor, { allowTags: true, useCache: false }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${descriptor.range}' to a valid ${descriptor.name} release`); - this.context.stdout.write(`Installing ${resolved.name}@${resolved.reference} in the project... -`); - const packageManagerInfo = await this.context.engine.ensurePackageManager(resolved); - await this.setAndInstallLocalPackageManager(packageManagerInfo); - } -}; - -// sources/commands/deprecated/Hydrate.ts -var import_promises4 = require("fs/promises"); -var import_path12 = __toESM(require("path")); -var HydrateCommand = class extends Command { - static paths = [ - [`hydrate`] - ]; - activate = options_exports.Boolean(`--activate`, false, { - description: `If true, this release will become the default one for this package manager` - }); - fileName = options_exports.String(); - async execute() { - const installFolder = getInstallFolder(); - const fileName = import_path12.default.resolve(this.context.cwd, this.fileName); - const archiveEntries = /* @__PURE__ */ new Map(); - let hasShortEntries = false; - const { list: tarT } = await Promise.resolve().then(() => (init_list(), list_exports)); - await tarT({ file: fileName, onentry: (entry) => { - const segments = entry.path.split(/\//g); - if (segments.length < 3) { - hasShortEntries = true; - } else { - let references = archiveEntries.get(segments[0]); - if (typeof references === `undefined`) - archiveEntries.set(segments[0], references = /* @__PURE__ */ new Set()); - references.add(segments[1]); - } - } }); - if (hasShortEntries || archiveEntries.size < 1) - throw new UsageError(`Invalid archive format; did it get generated by 'corepack prepare'?`); - const { extract: tarX } = await Promise.resolve().then(() => (init_extract(), extract_exports)); - for (const [name2, references] of archiveEntries) { - for (const reference of references) { - if (!isSupportedPackageManager(name2)) - throw new UsageError(`Unsupported package manager '${name2}'`); - if (this.activate) - this.context.stdout.write(`Hydrating ${name2}@${reference} for immediate activation... -`); - else - this.context.stdout.write(`Hydrating ${name2}@${reference}... -`); - await (0, import_promises4.mkdir)(installFolder, { recursive: true }); - await tarX({ file: fileName, cwd: installFolder }, [`${name2}/${reference}`]); - if (this.activate) { - await this.context.engine.activatePackageManager({ name: name2, reference }); - } - } - } - this.context.stdout.write(`All done! -`); - } -}; - -// sources/commands/deprecated/Prepare.ts -var import_promises5 = require("fs/promises"); -var import_path13 = __toESM(require("path")); -var PrepareCommand = class extends Command { - static paths = [ - [`prepare`] - ]; - activate = options_exports.Boolean(`--activate`, false, { - description: `If true, this release will become the default one for this package manager` - }); - json = options_exports.Boolean(`--json`, false, { - description: `If true, the output will be the path of the generated tarball` - }); - output = options_exports.String(`-o,--output`, { - description: `If true, the installed package managers will also be stored in a tarball`, - tolerateBoolean: true - }); - specs = options_exports.Rest(); - async execute() { - const specs = this.specs; - const installLocations = []; - if (specs.length === 0) { - const lookup = await loadSpec(this.context.cwd); - switch (lookup.type) { - case `NoProject`: - throw new UsageError(`Couldn't find a project in the local directory - please specify the package manager to pack, or run this command from a valid project`); - case `NoSpec`: - throw new UsageError(`The local project doesn't feature a 'packageManager' field - please specify the package manager to pack, or update the manifest to reference it`); - default: { - specs.push(lookup.getSpec()); - } - } - } - for (const request of specs) { - const spec = typeof request === `string` ? parseSpec(request, `CLI arguments`, { enforceExactVersion: false }) : request; - const resolved = await this.context.engine.resolveDescriptor(spec, { allowTags: true }); - if (resolved === null) - throw new UsageError(`Failed to successfully resolve '${spec.range}' to a valid ${spec.name} release`); - if (!this.json) { - if (this.activate) { - this.context.stdout.write(`Preparing ${spec.name}@${spec.range} for immediate activation... -`); - } else { - this.context.stdout.write(`Preparing ${spec.name}@${spec.range}... -`); - } - } - const installSpec = await this.context.engine.ensurePackageManager(resolved); - installLocations.push(installSpec.location); - if (this.activate) { - await this.context.engine.activatePackageManager(resolved); - } - } - if (this.output) { - const outputName = typeof this.output === `string` ? this.output : `corepack.tgz`; - const baseInstallFolder = getInstallFolder(); - const outputPath = import_path13.default.resolve(this.context.cwd, outputName); - if (!this.json) - this.context.stdout.write(`Packing the selected tools in ${import_path13.default.basename(outputPath)}... -`); - const { create: tarC } = await Promise.resolve().then(() => (init_create(), create_exports)); - await (0, import_promises5.mkdir)(baseInstallFolder, { recursive: true }); - await tarC({ gzip: true, cwd: baseInstallFolder, file: import_path13.default.resolve(outputPath) }, installLocations.map((location) => { - return import_path13.default.relative(baseInstallFolder, location); - })); - if (this.json) { - this.context.stdout.write(`${JSON.stringify(outputPath)} -`); - } else { - this.context.stdout.write(`All done! -`); - } - } - } -}; - -// sources/main.ts -function getPackageManagerRequestFromCli(parameter, engine) { - if (!parameter) - return null; - const match = parameter.match(/^([^@]*)(?:@(.*))?$/); - if (!match) - return null; - const [, binaryName, binaryVersion] = match; - const packageManager = engine.getPackageManagerFor(binaryName); - if (packageManager == null && binaryVersion == null) return null; - return { - packageManager, - binaryName, - binaryVersion: binaryVersion || null - }; -} -function isUsageError(error) { - return error?.name === `UsageError`; -} -async function runMain(argv) { - const engine = new Engine(); - const [firstArg, ...restArgs] = argv; - const request = getPackageManagerRequestFromCli(firstArg, engine); - if (!request) { - const cli = new Cli({ - binaryLabel: `Corepack`, - binaryName: `corepack`, - binaryVersion: version - }); - cli.register(builtins_exports.HelpCommand); - cli.register(builtins_exports.VersionCommand); - cli.register(CacheCommand); - cli.register(DisableCommand); - cli.register(EnableCommand); - cli.register(InstallGlobalCommand); - cli.register(InstallLocalCommand); - cli.register(PackCommand); - cli.register(UpCommand); - cli.register(UseCommand); - cli.register(HydrateCommand); - cli.register(PrepareCommand); - const context = { - ...Cli.defaultContext, - cwd: process.cwd(), - engine - }; - const code2 = await cli.run(argv, context); - if (code2 !== 0) { - process.exitCode ??= code2; - } - } else { - try { - await engine.executePackageManagerRequest(request, { - cwd: process.cwd(), - args: restArgs - }); - } catch (error) { - if (isUsageError(error)) { - console.error(error.message); - process.exit(1); - } - throw error; - } - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - runMain -}); -/*! Bundled license information: - -undici/lib/web/fetch/body.js: - (*! formdata-polyfill. MIT License. Jimmy Wärting *) - -is-windows/index.js: - (*! - * is-windows - * - * Copyright © 2015-2018, Jon Schlinkert. - * Released under the MIT License. - *) -*/ diff --git a/node_modules/corepack/dist/npm.js b/node_modules/corepack/dist/npm.js deleted file mode 100755 index 75f68b058f..0000000000 --- a/node_modules/corepack/dist/npm.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(['npm', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/npx.js b/node_modules/corepack/dist/npx.js deleted file mode 100755 index b1138bb48e..0000000000 --- a/node_modules/corepack/dist/npx.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(['npx', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/pnpm.js b/node_modules/corepack/dist/pnpm.js deleted file mode 100755 index 56ba509405..0000000000 --- a/node_modules/corepack/dist/pnpm.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(['pnpm', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/pnpx.js b/node_modules/corepack/dist/pnpx.js deleted file mode 100755 index ee36be2e99..0000000000 --- a/node_modules/corepack/dist/pnpx.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(['pnpx', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/yarn.js b/node_modules/corepack/dist/yarn.js deleted file mode 100755 index ce628c82b6..0000000000 --- a/node_modules/corepack/dist/yarn.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(['yarn', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/dist/yarnpkg.js b/node_modules/corepack/dist/yarnpkg.js deleted file mode 100755 index 9541ed726a..0000000000 --- a/node_modules/corepack/dist/yarnpkg.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='1' -require('module').enableCompileCache?.(); -require('./lib/corepack.cjs').runMain(['yarnpkg', ...process.argv.slice(2)]); \ No newline at end of file diff --git a/node_modules/corepack/package.json b/node_modules/corepack/package.json deleted file mode 100644 index 704128ccd4..0000000000 --- a/node_modules/corepack/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "corepack", - "version": "0.34.5", - "homepage": "https://github.com/nodejs/corepack#readme", - "bugs": { - "url": "https://github.com/nodejs/corepack/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/nodejs/corepack.git" - }, - "engines": { - "node": "^20.10.0 || ^22.11.0 || >=24.0.0" - }, - "exports": { - "./package.json": "./package.json" - }, - "license": "MIT", - "packageManager": "yarn@4.11.0+sha224.209a3e277c6bbc03df6e4206fbfcb0c1621c27ecf0688f79a0c619f0", - "devDependencies": { - "@types/debug": "^4.1.5", - "@types/node": "^20.4.6", - "@types/proxy-from-env": "^1", - "@types/semver": "^7.1.0", - "@types/which": "^3.0.0", - "@yarnpkg/eslint-config": "^3.0.0", - "@yarnpkg/fslib": "^3.0.0-rc.48", - "@zkochan/cmd-shim": "^6.0.0", - "better-sqlite3": "^11.7.2", - "clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch", - "debug": "^4.1.1", - "esbuild": "^0.25.0", - "eslint": "^9.22.0", - "proxy-from-env": "^1.1.0", - "semver": "^7.6.3", - "supports-color": "^10.0.0", - "tar": "^7.4.0", - "tsx": "^4.16.2", - "typescript": "^5.7.3", - "undici": "^6.21.2", - "v8-compile-cache": "^2.3.0", - "vitest": "^3.0.5", - "which": "^5.0.0" - }, - "resolutions": { - "undici-types": "6.x" - }, - "scripts": { - "build": "run clean && run build:bundle && tsx ./mkshims.ts", - "build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'", - "clean": "run rimraf dist shims", - "corepack": "tsx ./sources/_cli.ts", - "lint": "eslint .", - "prepack": "yarn build", - "postpack": "run clean", - "rimraf": "node -e 'for(let i=2;i TextAnchor( + textBefore = prefix, + textAfter = text + suffix + ) + true -> TextAnchor( + textBefore = prefix + text, + textAfter = text + ) + } + +/** + * A [TextAnchor] is a pair of short text snippets allowing to locate in a text. + */ +@ExperimentalReadiumApi +public data class TextAnchor( + val textBefore: String, + val textAfter: String, +) + +@ExperimentalReadiumApi +public fun Locator.Text.toTextQuote(): TextQuote? = + highlight?.let { highlight -> + TextQuote( + text = highlight, + prefix = before.orEmpty(), + suffix = after.orEmpty() + ) + } + +@ExperimentalReadiumApi +public fun Locator.Text.toTextAnchor(end: Boolean = false): TextAnchor? = + toTextQuote()?.toTextAnchor(end) diff --git a/readium/navigators/common/src/main/java/org/readium/navigator/common/Locations.kt b/readium/navigators/common/src/main/java/org/readium/navigator/common/Locations.kt index 97c9ba97a4..56181dd8b5 100644 --- a/readium/navigators/common/src/main/java/org/readium/navigator/common/Locations.kt +++ b/readium/navigators/common/src/main/java/org/readium/navigator/common/Locations.kt @@ -63,3 +63,9 @@ public interface PositionLocation : Location { public val position: Position } + +@ExperimentalReadiumApi +public interface TextAnchorLocation : Location { + + public val textAnchor: TextAnchor +} diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt index 7e78f4b1a7..2d0bd5c5cd 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebLocations.kt @@ -90,14 +90,14 @@ public sealed interface FixedWebDecorationLocation : DecorationLocation { internal data class FixedWebDecorationCssSelectorLocation( override val href: Url, - val cssSelector: CssSelector, -) : FixedWebDecorationLocation + override val cssSelector: CssSelector, +) : FixedWebDecorationLocation, CssSelectorLocation internal data class FixedWebDecorationTextQuoteLocation( override val href: Url, - val textQuote: TextQuote, + override val textQuote: TextQuote, val cssSelector: CssSelector?, -) : FixedWebDecorationLocation +) : FixedWebDecorationLocation, TextQuoteLocation @ExperimentalReadiumApi @ConsistentCopyVisibility diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 6acaf0eeba..d7d8e9f1ca 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -97,7 +97,8 @@ public class FixedWebRenditionState internal constructor( ) internal val lastMeasureLayout: State> = derivedStateOf { - pagerState.currentPage to Snapshot.withoutReadObservation { layoutDelegate.layout.value } } + pagerState.currentPage to Snapshot.withoutReadObservation { layoutDelegate.layout.value } + } private val initialSpread = layoutDelegate.layout.value .spreadIndexForHref(initialLocation.href) diff --git a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts index 79dc1cf916..5bbda3271a 100644 --- a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts +++ b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts @@ -1,3 +1,6 @@ +import { TextQuoteAnchor } from "../vendor/hypothesis/annotator/anchoring/types" +import { log } from "../util/log" + export class ReflowableMoveBridge { readonly document: HTMLDocument @@ -8,21 +11,74 @@ export class ReflowableMoveBridge { getOffsetForLocation(location: string, vertical: boolean): number | null { const actualLocation = parseLocation(location) + if (actualLocation.textAfter || actualLocation.textBefore) { + return this.getOffsetForTextAnchor( + actualLocation.textBefore ?? "", + actualLocation.textAfter ?? "", + vertical + ) + } + if (actualLocation.htmlId) { return this.getOffsetForHtmlId(actualLocation.htmlId, vertical) } + if (actualLocation.cssSelector) { + return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical) + } + return null } + private getOffsetForTextAnchor( + textBefore: string, + textAfter: string, + vertical: boolean + ): number | null { + const root = document.body + + const anchor = new TextQuoteAnchor(root, "", { + prefix: textBefore, + suffix: textAfter, + }) + const range = anchor.toRange() + + return this.getOffsetForRect(range.getBoundingClientRect(), vertical) + } + + private getOffsetForCssSelector( + cssSelector: string, + vertical: boolean + ): number | null { + let element + try { + element = document.querySelector(cssSelector) + } catch (e) { + log(e) + } + + if (!element) { + return null + } + + return this.getOffsetForElement(element, vertical) + } + private getOffsetForHtmlId(htmlId: string, vertical: boolean): number | null { const element = this.document.getElementById(htmlId) if (!element) { return null } + return this.getOffsetForElement(element, vertical) + } + + private getOffsetForElement(element: Element, vertical: boolean): number { const rect = element.getBoundingClientRect() + return this.getOffsetForRect(rect, vertical) + } + private getOffsetForRect(rect: DOMRect, vertical: boolean): number { if (vertical) { return rect.top + window.scrollY } else { @@ -35,6 +91,9 @@ export class ReflowableMoveBridge { interface Location { progression: number htmlId: string + cssSelector: string + textBefore: string + textAfter: string } function parseLocation(location: string): Location { diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index 96b9717072..708938a319 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class M{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class ${constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){const r=function(t){return JSON.parse(t)}(t);return r.htmlId?this.getOffsetForHtmlId(r.htmlId,e):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);if(!r)return null;const n=r.getBoundingClientRect();return e?n.top+window.scrollY:n.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class M{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class ${constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index 16c2ed898b..e0d3264369 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-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IzH,EAAiBtd,OAAQwkB,EAAgBhH,GAC7C,IAAIe,EAAkBve,OAAQwkB,EAClC,CAEA,aAAAJ,GACIj3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMiO,EAAOrvB,SAASmiB,cAAc,QACpCkN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B12B,KAAK6S,OAAOrK,SAASsvB,KAAKhN,YAAY+M,EAAK,GAEnD,GFIsBhlB,OAAQA,OAAOklB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a
.\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","export class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n const actualLocation = parseLocation(location);\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n const rect = element.getBoundingClientRect();\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","htmlId","getOffsetForHtmlId","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GAAK,EAEvCxB,EAAM,CACNK,EAAG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S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMqO,EAAOzvB,SAASmiB,cAAc,QACpCsN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B92B,KAAK6S,OAAOrK,SAAS0vB,KAAKpN,YAAYmN,EAAK,GAEnD,GFIsBplB,OAAQA,OAAOslB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","htmlId","getOffsetForHtmlId","getOffsetForCssSelector","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt index e569d93b58..9908affe41 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/ReflowableMoveApi.kt @@ -15,8 +15,10 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json +import org.readium.navigator.common.CssSelector import org.readium.navigator.common.HtmlId import org.readium.navigator.common.Progression +import org.readium.navigator.common.TextAnchor import org.readium.navigator.web.internals.webview.evaluateJavaScriptSuspend import org.readium.r2.shared.ExperimentalReadiumApi @@ -27,18 +29,28 @@ public class ReflowableMoveApi( public suspend fun getOffsetForLocation( progression: Progression? = null, htmlId: HtmlId? = null, + cssSelector: CssSelector? = null, + textAnchor: TextAnchor? = null, orientation: Orientation, ): Int? = withContext(Dispatchers.Main) { - getOffsetForLocationUnsafe(progression, htmlId, orientation) + getOffsetForLocationUnsafe(progression, htmlId, cssSelector, textAnchor, orientation) } private suspend fun getOffsetForLocationUnsafe( progression: Progression?, htmlId: HtmlId?, + cssSelector: CssSelector? = null, + textAnchor: TextAnchor? = null, orientation: Orientation, ): Int? { - val jsonLocation = JsonLocation(progression?.value, htmlId?.value) + val jsonLocation = JsonLocation( + progression = progression?.value, + htmlId = htmlId?.value, + cssSelector = cssSelector?.value, + textBefore = textAnchor?.textBefore, + textAfter = textAnchor?.textAfter + ) val locationAsLiteral = Json.encodeToString(jsonLocation).toJavaScriptLiteral() val vertical = orientation == Orientation.Vertical val script = "move.getOffsetForLocation($locationAsLiteral, $vertical)" @@ -51,4 +63,7 @@ public class ReflowableMoveApi( private data class JsonLocation( val progression: Double?, val htmlId: String?, + val cssSelector: String?, + val textBefore: String?, + val textAfter: String?, ) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt index a5e4e0d1cb..5291c1aa44 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebLocations.kt @@ -21,8 +21,11 @@ import org.readium.navigator.common.PositionLocation import org.readium.navigator.common.Progression import org.readium.navigator.common.ProgressionLocation import org.readium.navigator.common.SelectionLocation +import org.readium.navigator.common.TextAnchor +import org.readium.navigator.common.TextAnchorLocation import org.readium.navigator.common.TextQuote import org.readium.navigator.common.TextQuoteLocation +import org.readium.navigator.common.toTextAnchor import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.InternalReadiumApi import org.readium.r2.shared.extensions.addPrefix @@ -38,19 +41,23 @@ public data class ReflowableWebGoLocation( override val href: Url, val progression: Progression? = null, val htmlId: HtmlId? = null, - // val textBefore: String? = null, - // val textAfter: String? = null, - // val position: Int? = null + val cssSelector: CssSelector? = null, + val textAnchor: TextAnchor? = null, ) : GoLocation { public constructor(location: Location) : this( href = location.href, - progression = (location as? ProgressionLocation)?.progression + progression = (location as? ProgressionLocation)?.progression, + cssSelector = (location as? CssSelectorLocation)?.cssSelector, + textAnchor = (location as? TextAnchorLocation)?.textAnchor + ?: (location as? TextQuoteLocation)?.textQuote?.toTextAnchor() ) public constructor(locator: Locator) : this( href = locator.href, - progression = locator.locations.progression?.let { Progression(it) } + progression = locator.locations.progression?.let { Progression(it) }, + cssSelector = locator.locations.cssSelector?.let { CssSelector(it) }, + textAnchor = locator.text.toTextAnchor() ) } @@ -114,14 +121,14 @@ public sealed interface ReflowableWebDecorationLocation : DecorationLocation { internal data class ReflowableWebDecorationCssSelectorLocation( override val href: Url, - val cssSelector: CssSelector, -) : ReflowableWebDecorationLocation + override val cssSelector: CssSelector, +) : ReflowableWebDecorationLocation, CssSelectorLocation internal data class ReflowableWebDecorationTextQuoteLocation( override val href: Url, - val textQuote: TextQuote, + override val textQuote: TextQuote, val cssSelector: CssSelector?, -) : ReflowableWebDecorationLocation +) : ReflowableWebDecorationLocation, TextQuoteLocation @ExperimentalReadiumApi @ConsistentCopyVisibility diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 213b806738..3f389458ce 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -525,6 +525,8 @@ private fun ReflowableWebGoLocation.toResourceLocations( val resourceLocation = progression ?.let { ReflowableResourceLocation.Progression(it) } ?: htmlId?.let { ReflowableResourceLocation.HtmlId(it) } + ?: cssSelector?.let { ReflowableResourceLocation.CssSelector(it) } + ?: textAnchor?.let { ReflowableResourceLocation.TextAnchor(it) } ?: ReflowableResourceLocation.Progression(Progression(0.0)!!) return readingOrder.items.mapIndexed { index, state -> diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index cc7c61e863..1d03845e64 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -190,7 +190,10 @@ internal fun ReflowableResource( Timber.d("resource ${resourceState.index} ready to scroll") when (val pending = resourceState.pendingLocation) { - is ReflowableResourceLocation.HtmlId -> { + is ReflowableResourceLocation.HtmlId, + is ReflowableResourceLocation.CssSelector, + is ReflowableResourceLocation.TextAnchor, + -> { // Wait for the MoveApi } is ReflowableResourceLocation.Progression -> { @@ -253,6 +256,34 @@ internal fun ReflowableResource( }.onEach { pendingLocation -> pendingLocation?.let { when (pendingLocation) { + is ReflowableResourceLocation.CssSelector -> { + val offset = moveApi.getOffsetForLocation( + progression = null, + cssSelector = pendingLocation.value, + orientation = orientation + ) + offset?.let { offset -> + scrollController.moveToOffset( + offset = with(density) { offset.dp.roundToPx() }, + snap = !scroll, + orientation = orientation, + ) + } + } + is ReflowableResourceLocation.TextAnchor -> { + val offset = moveApi.getOffsetForLocation( + progression = null, + textAnchor = pendingLocation.value, + orientation = orientation + ) + offset?.let { offset -> + scrollController.moveToOffset( + offset = with(density) { offset.dp.roundToPx() }, + snap = !scroll, + orientation = orientation, + ) + } + } is ReflowableResourceLocation.HtmlId -> { val offset = moveApi.getOffsetForLocation( progression = null, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt index be49f29e15..5e0cd3defe 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt @@ -110,6 +110,14 @@ internal sealed interface ReflowableResourceLocation { data class HtmlId( val value: org.readium.navigator.common.HtmlId, ) : ReflowableResourceLocation + + data class CssSelector( + val value: org.readium.navigator.common.CssSelector, + ) : ReflowableResourceLocation + + data class TextAnchor( + val value: org.readium.navigator.common.TextAnchor, + ) : ReflowableResourceLocation } internal data class PendingGo( From a561408927e5c312e722e15314b06e67966223ea Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 14 Jan 2026 16:30:37 +0100 Subject: [PATCH 24/56] Fix location priority in go --- .../scripts/src/bridge/reflowable-move-bridge.ts | 8 ++++---- .../internals/generated/reflowable-injectable-script.js | 2 +- .../generated/reflowable-injectable-script.js.map | 2 +- .../web/reflowable/ReflowableWebRenditionState.kt | 8 +++----- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts index 5bbda3271a..de52de5792 100644 --- a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts +++ b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts @@ -19,14 +19,14 @@ export class ReflowableMoveBridge { ) } - if (actualLocation.htmlId) { - return this.getOffsetForHtmlId(actualLocation.htmlId, vertical) - } - if (actualLocation.cssSelector) { return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical) } + if (actualLocation.htmlId) { + return this.getOffsetForHtmlId(actualLocation.htmlId, vertical) + } + return null } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index 708938a319..0957e3bd73 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class M{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class ${constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class M{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class ${constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index e0d3264369..2619586483 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,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hB,OAAOrK,UAC9CxI,KAAKowB,SAASyH,oBACd73B,KAAK6S,OAAO0f,UAAY,IAAIiC,EAA0B3hB,OAAQ,IAAI8e,EAAiB9e,SACnF7S,KAAKowB,SAAS0H,0BACd93B,KAAK6S,OAAOklB,YAAc,IAAI3E,EAA4BvgB,OAAQwd,GAClErwB,KAAKowB,SAAS4H,2BACd,IAAI7H,EAAiBtd,OAAQ4kB,EAAgBpH,GAC7C,IAAIe,EAAkBve,OAAQ4kB,EAClC,CAEA,aAAAJ,GACIr3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMqO,EAAOzvB,SAASmiB,cAAc,QACpCsN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B92B,KAAK6S,OAAOrK,SAAS0vB,KAAKpN,YAAYmN,EAAK,GAEnD,GFIsBplB,OAAQA,OAAOslB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","htmlId","getOffsetForHtmlId","getOffsetForCssSelector","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GAAK,EAEvCxB,EAAM,CACNK,EAAG,IAAIsB,YAAYF,EAAO,GAC1BlB,EAAG,IAAIoB,YAAYF,EAAO,GAC1BV,YAAa,IAAIY,YAAYF,EAAO,IAExCzB,EAAIe,YAAYa,KAAK,GAAK,IAC1B5B,EAAIe,YAAYU,GAAQ,IAAMP,EAAQE,OAAS,GAAKI,EAUpD,IARA,IAAIK,EAAW,IAAIF,YAAYF,EAAO,GAGlCxB,EAAM,IAAI6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approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 3f389458ce..aa479114d1 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -522,12 +522,10 @@ private fun ReflowableWebGoLocation.toResourceLocations( destIndex: Int, readingOrder: ReflowableWebPublication.ReadingOrder, ): List { - val resourceLocation = progression - ?.let { ReflowableResourceLocation.Progression(it) } - ?: htmlId?.let { ReflowableResourceLocation.HtmlId(it) } + val resourceLocation = textAnchor?.let { ReflowableResourceLocation.TextAnchor(it) } ?: cssSelector?.let { ReflowableResourceLocation.CssSelector(it) } - ?: textAnchor?.let { ReflowableResourceLocation.TextAnchor(it) } - ?: ReflowableResourceLocation.Progression(Progression(0.0)!!) + ?: htmlId?.let { ReflowableResourceLocation.HtmlId(it) } + ?: ReflowableResourceLocation.Progression(progression ?: Progression(0.0)!!) return readingOrder.items.mapIndexed { index, state -> when { From 638692f8779658c3b754d297682bbd77ca87b06a Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 14 Jan 2026 18:45:40 +0100 Subject: [PATCH 25/56] Remove package.json --- package-lock.json | 28 ---------------------------- package.json | 5 ----- 2 files changed, 33 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 5f9a96ef66..0000000000 --- a/package-lock.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "kotlin-toolkit", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "corepack": "^0.34.5" - } - }, - "node_modules/corepack": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/corepack/-/corepack-0.34.5.tgz", - "integrity": "sha512-G+ui7ZUxTzgwRc45pi7OhOybKFnGpxVDp0khf+eFdw/gcQmZfme4nUh4Z4URY9YPoaZYP86zNZmqV/T2Bf5/rA==", - "license": "MIT", - "bin": { - "corepack": "dist/corepack.js", - "pnpm": "dist/pnpm.js", - "pnpx": "dist/pnpx.js", - "yarn": "dist/yarn.js", - "yarnpkg": "dist/yarnpkg.js" - }, - "engines": { - "node": "^20.10.0 || ^22.11.0 || >=24.0.0" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 462180ff17..0000000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "corepack": "^0.34.5" - } -} From 751831dfe20fc5cefbca6fcf5a0c917f1e95961a Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 15 Jan 2026 00:30:42 +0100 Subject: [PATCH 26/56] Improvements and cosmetic changes in FXL, rationalize dependencies --- readium/navigators/common/build.gradle.kts | 6 +- .../navigators/web/common/build.gradle.kts | 7 +- .../web/fixedlayout/build.gradle.kts | 9 ++- .../web/fixedlayout/FixedWebRendition.kt | 35 ++++----- .../web/fixedlayout/FixedWebRenditionState.kt | 76 +++++++++++++------ .../navigators/web/internals/build.gradle.kts | 7 +- .../web/reflowable/build.gradle.kts | 9 ++- 7 files changed, 89 insertions(+), 60 deletions(-) diff --git a/readium/navigators/common/build.gradle.kts b/readium/navigators/common/build.gradle.kts index 3eba3cbc02..624f751210 100644 --- a/readium/navigators/common/build.gradle.kts +++ b/readium/navigators/common/build.gradle.kts @@ -22,11 +22,11 @@ dependencies { api(project(":readium:readium-shared")) api(project(":readium:readium-navigator")) + api(libs.androidx.compose.foundation) + api(libs.kotlinx.coroutines.android) api(libs.kotlinx.collections.immutable) + api(libs.kotlinx.serialization.json) implementation(libs.androidx.recyclerview) - implementation(libs.kotlinx.serialization.json) - implementation(libs.bundles.compose) implementation(libs.timber) - implementation(libs.kotlinx.coroutines.android) } diff --git a/readium/navigators/web/common/build.gradle.kts b/readium/navigators/web/common/build.gradle.kts index e080b592d5..ba242ec8c0 100644 --- a/readium/navigators/web/common/build.gradle.kts +++ b/readium/navigators/web/common/build.gradle.kts @@ -23,10 +23,9 @@ dependencies { api(project(":readium:readium-navigator")) api(project(":readium:navigators:readium-navigator-common")) + api(libs.androidx.compose.foundation) + api(libs.kotlinx.coroutines.android) api(libs.kotlinx.collections.immutable) - - implementation(libs.kotlinx.serialization.json) - implementation(libs.bundles.compose) + api(libs.kotlinx.serialization.json) implementation(libs.timber) - implementation(libs.kotlinx.coroutines.android) } diff --git a/readium/navigators/web/fixedlayout/build.gradle.kts b/readium/navigators/web/fixedlayout/build.gradle.kts index f08a020f87..515258accb 100644 --- a/readium/navigators/web/fixedlayout/build.gradle.kts +++ b/readium/navigators/web/fixedlayout/build.gradle.kts @@ -25,11 +25,12 @@ dependencies { api(project(":readium:navigators:web:readium-navigator-web-common")) implementation(project(":readium:navigators:web:readium-navigator-web-internals")) - implementation(libs.kotlinx.serialization.json) - implementation(libs.kotlinx.collections.immutable) - implementation(libs.bundles.compose) + api(libs.androidx.compose.foundation) + api(libs.kotlinx.coroutines.android) + api(libs.kotlinx.collections.immutable) + api(libs.kotlinx.serialization.json) + implementation(libs.timber) - implementation(libs.kotlinx.coroutines.android) implementation(libs.androidx.webkit) implementation(libs.jsoup) } diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index 2bda3a906e..702928833b 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -4,6 +4,8 @@ * available in the top-level LICENSE file of the project. */ +@file:OptIn(ExperimentalReadiumApi::class) + package org.readium.navigator.web.fixedlayout import android.annotation.SuppressLint @@ -13,7 +15,6 @@ import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.displayCutout import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect @@ -75,10 +76,10 @@ import org.readium.r2.shared.util.Url public fun FixedWebRendition( state: FixedWebRenditionState, modifier: Modifier = Modifier, + backgroundColor: Color = Color.White, windowInsets: WindowInsets = WindowInsets.displayCutout, - backgroundColor: Color = MaterialTheme.colorScheme.background, inputListener: InputListener = defaultInputListener(state.controller), - hyperlinkListener: HyperlinkListener = defaultHyperlinkListener(controller = state.controller), + hyperlinkListener: HyperlinkListener = defaultHyperlinkListener(state.controller), decorationListener: DecorationListener = defaultDecorationListener(state.controller), textSelectionActionModeCallback: ActionMode.Callback? = null, ) { @@ -97,19 +98,8 @@ public fun FixedWebRendition( val displayArea = rememberUpdatedState(DisplayArea(viewportSize.value, safeDrawingPadding)) - fun currentLocation(): FixedWebLocation { - val (currentSpreadIndex, currentLayout) = state.lastMeasureLayout.value - val itemIndex = currentLayout.pageIndexForSpread(currentSpreadIndex) - val href = state.publication.readingOrder[itemIndex].href - val mediaType = state.publication.readingOrder[itemIndex].mediaType - val position = Position(itemIndex + 1)!! - val totalProgression = Progression(currentSpreadIndex / currentLayout.spreads.size.toDouble())!! - - return FixedWebLocation(href, position, totalProgression, mediaType) - } - if (state.controller == null) { - state.initController(location = currentLocation()) + state.initController(location = state.currentLocation()) } val coroutineScope = rememberCoroutineScope() @@ -152,7 +142,7 @@ public fun FixedWebRendition( snapshotFlow { state.pagerState.currentPage }.onEach { - state.navigationDelegate.updateLocation(currentLocation()) + state.navigationDelegate.updateLocation(state.currentLocation()) }.launchIn(this) } @@ -285,6 +275,18 @@ public fun FixedWebRendition( } } +private fun FixedWebRenditionState.currentLocation(): FixedWebLocation { + val lastMeasureInfoNow = lastMeasureInfo + val currentSpreadIndex = lastMeasureInfoNow.value.currentSpread + val currentLayout = lastMeasureInfoNow.value.layout + val itemIndex = currentLayout.pageIndexForSpread(currentSpreadIndex) + val href = publication.readingOrder[itemIndex].href + val mediaType = publication.readingOrder[itemIndex].mediaType + val position = Position(itemIndex + 1)!! + val totalProgression = Progression(currentSpreadIndex / currentLayout.spreads.size.toDouble())!! + return FixedWebLocation(href, position, totalProgression, mediaType) +} + @Composable private fun WindowInsets.asAbsolutePaddingValues(): AbsolutePaddingValues { val density = LocalDensity.current @@ -296,7 +298,6 @@ private fun WindowInsets.asAbsolutePaddingValues(): AbsolutePaddingValues { return AbsolutePaddingValues(top = top, right = right, bottom = bottom, left = left) } -@OptIn(ExperimentalReadiumApi::class) private suspend fun HyperlinkProcessor.onLinkActivated( url: Url, outerHtml: String, diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index d7d8e9f1ca..0a31f22298 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -9,6 +9,7 @@ package org.readium.navigator.web.fixedlayout import android.app.Application +import androidx.compose.foundation.MutatePriority import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.MutableState import androidx.compose.runtime.Stable @@ -28,7 +29,6 @@ import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.currentCoroutineContext -import org.readium.navigator.common.Decoration import org.readium.navigator.common.DecorationController import org.readium.navigator.common.NavigationController import org.readium.navigator.common.Overflow @@ -90,19 +90,23 @@ public class FixedWebRenditionState internal constructor( override val controller: FixedWebRenditionController? by controllerState + internal val lastMeasureInfo: State = derivedStateOf { + FixedLayoutMeasureInfo( + currentSpread = pagerState.currentPage, + layout = Snapshot.withoutReadObservation { layoutDelegate.layout.value } + ) + } + internal val layoutDelegate: FixedLayoutDelegate = FixedLayoutDelegate( publication.readingOrder, initialSettings ) - internal val lastMeasureLayout: State> = derivedStateOf { - pagerState.currentPage to Snapshot.withoutReadObservation { layoutDelegate.layout.value } - } - - private val initialSpread = layoutDelegate.layout.value - .spreadIndexForHref(initialLocation.href) - ?: 0 + private val initialSpread: Int = + layoutDelegate.layout.value + .spreadIndexForHref(initialLocation.href) + ?: 0 internal val pagerState: PagerState = PagerState( @@ -113,13 +117,13 @@ public class FixedWebRenditionState internal constructor( internal val selectionDelegate: FixedSelectionDelegate = FixedSelectionDelegate( pagerState = pagerState, - layout = layoutDelegate.layout + lastMeasureInfo = lastMeasureInfo ) internal val decorationDelegate: FixedDecorationDelegate = FixedDecorationDelegate(configuration.decorationTemplates) - internal val hyperlinkProcessor = + internal val hyperlinkProcessor: HyperlinkProcessor = HyperlinkProcessor(publication.container) private val webViewServer = run { @@ -152,7 +156,7 @@ public class FixedWebRenditionState internal constructor( navigationDelegate = FixedNavigationDelegate( pagerState, - layoutDelegate.layout, + lastMeasureInfo, layoutDelegate.overflow, location ) @@ -185,6 +189,11 @@ internal data class FixedWebPreloadedData( val fixedDoubleContent: String, ) +internal class FixedLayoutMeasureInfo( + val currentSpread: Int, + val layout: Layout, +) + internal class FixedLayoutDelegate( readingOrder: FixedWebPublication.ReadingOrder, initialSettings: FixedWebSettings, @@ -210,13 +219,14 @@ internal class FixedLayoutDelegate( Layout(settings.readingProgression, newSpreads) } - val fit: State = - derivedStateOf { settings.fit } + val fit: State = derivedStateOf { + settings.fit + } } internal class FixedNavigationDelegate( private val pagerState: PagerState, - private val layout: State, + private val lastMeasureInfo: State, overflowState: State, initialLocation: FixedWebLocation, ) : NavigationController, OverflowController { @@ -236,8 +246,12 @@ internal class FixedNavigationDelegate( } override suspend fun goTo(location: FixedWebGoLocation) { - val spreadIndex = layout.value.spreadIndexForHref(location.href) ?: return - pagerState.scrollToPage(spreadIndex) + pagerState.scroll(MutatePriority.PreventUserInput) { + val spreadIndex = lastMeasureInfo.value.layout.spreadIndexForHref(location.href) + ?: return@scroll + + pagerState.requestScrollToPage(spreadIndex) + } } override suspend fun goTo(location: FixedWebLocation) { @@ -245,20 +259,32 @@ internal class FixedNavigationDelegate( } override val canMoveForward: Boolean - get() = pagerState.currentPage < layout.value.spreads.size - 1 + get() = lastMeasureInfo.value.currentSpread < lastMeasureInfo.value.layout.spreads.size - 1 override val canMoveBackward: Boolean - get() = pagerState.currentPage > 0 + get() = lastMeasureInfo.value.currentSpread > 0 override suspend fun moveForward() { - if (canMoveForward) { - pagerState.scrollToPage(pagerState.currentPage + 1) + if (pagerState.isScrollInProgress) { + return + } + + pagerState.scroll { + if (canMoveForward) { + pagerState.requestScrollToPage(pagerState.currentPage + 1) + } } } override suspend fun moveBackward() { - if (canMoveBackward) { - pagerState.scrollToPage(pagerState.currentPage - 1) + if (pagerState.isScrollInProgress) { + return + } + + pagerState.scroll { + if (canMoveBackward) { + pagerState.requestScrollToPage(pagerState.currentPage - 1) + } } } } @@ -268,12 +294,12 @@ internal class FixedDecorationDelegate( ) : DecorationController { override var decorations: PersistentMap> by - mutableStateOf(persistentMapOf>>()) + mutableStateOf(persistentMapOf()) } internal class FixedSelectionDelegate( private val pagerState: PagerState, - private val layout: State, + private val lastMeasureInfo: State, ) : SelectionController { val selectionApis: SnapshotStateMap = @@ -286,7 +312,7 @@ internal class FixedSelectionDelegate( .mapNotNull { index -> selectionApis[index]?.let { index to it } } .map { (index, api) -> coroutineScope.async { - api.getCurrentSelection(index, layout.value) + api.getCurrentSelection(index, lastMeasureInfo.value.layout) } }.awaitAll() .filterNotNull() diff --git a/readium/navigators/web/internals/build.gradle.kts b/readium/navigators/web/internals/build.gradle.kts index d2617a0f9f..9a0bbabb24 100644 --- a/readium/navigators/web/internals/build.gradle.kts +++ b/readium/navigators/web/internals/build.gradle.kts @@ -24,10 +24,11 @@ dependencies { api(project(":readium:navigators:readium-navigator-common")) api(project(":readium:navigators:web:readium-navigator-web-common")) - implementation(libs.kotlinx.serialization.json) - implementation(libs.bundles.compose) + api(libs.androidx.compose.foundation) + api(libs.kotlinx.coroutines.android) + api(libs.kotlinx.collections.immutable) + api(libs.kotlinx.serialization.json) implementation(libs.timber) - implementation(libs.kotlinx.coroutines.android) implementation(libs.androidx.webkit) implementation(libs.jsoup) } diff --git a/readium/navigators/web/reflowable/build.gradle.kts b/readium/navigators/web/reflowable/build.gradle.kts index bb74f066d5..5ec205ae20 100644 --- a/readium/navigators/web/reflowable/build.gradle.kts +++ b/readium/navigators/web/reflowable/build.gradle.kts @@ -25,11 +25,12 @@ dependencies { api(project(":readium:navigators:web:readium-navigator-web-common")) implementation(project(":readium:navigators:web:readium-navigator-web-internals")) - implementation(libs.kotlinx.serialization.json) - implementation(libs.kotlinx.collections.immutable) - implementation(libs.bundles.compose) + api(libs.androidx.compose.foundation) + api(libs.kotlinx.coroutines.android) + api(libs.kotlinx.collections.immutable) + api(libs.kotlinx.serialization.json) + implementation(libs.androidx.core) implementation(libs.timber) - implementation(libs.kotlinx.coroutines.android) implementation(libs.androidx.webkit) implementation(libs.jsoup) } From 84b95c4270e78bc40da2b43f905b55123e75d300 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 15 Jan 2026 15:36:02 +0100 Subject: [PATCH 27/56] Remove decoration group when it's missing in the new submitted decorations --- .../spread/DoubleViewportSpread.kt | 10 ++-- .../spread/SingleViewportSpread.kt | 52 ++++++++++--------- .../reflowable/resource/ReflowableResource.kt | 6 ++- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/DoubleViewportSpread.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/DoubleViewportSpread.kt index ddbebf1797..2b35585224 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/DoubleViewportSpread.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/DoubleViewportSpread.kt @@ -154,9 +154,13 @@ internal fun DoubleViewportSpread( var lastDecorations = emptyMap>() snapshotFlow { decorations.value } .onEach { - for ((group, decos) in it.entries) { - val lastInGroup = lastDecorations[group].orEmpty() - for ((href, changes) in lastInGroup.changesByHref(decos)) { + val oldAndUpdatedGroups = it.keys + lastDecorations.keys + for (group in oldAndUpdatedGroups) { + val updatedDecos = it[group].orEmpty() + val changesByHref = lastDecorations[group].orEmpty() + .changesByHref(updatedDecos) + + for ((href, changes) in changesByHref) { val iframe = when (href) { state.spread.leftPage?.href -> Iframe.Left state.spread.rightPage?.href -> Iframe.Right diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SingleViewportSpread.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SingleViewportSpread.kt index 7dd51afe91..ef3f585fec 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SingleViewportSpread.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/spread/SingleViewportSpread.kt @@ -154,29 +154,33 @@ internal fun SingleViewportSpread( var lastDecorations = emptyMap>>() snapshotFlow { decorations.value } .onEach { - for ((group, decos) in it.entries) { - val lastInGroup = lastDecorations[group].orEmpty() - for ((_, changes) in lastInGroup.changesByHref(decos)) { - for (change in changes) { - when (change) { - is DecorationChange.Added -> { - val template = decorationTemplates[change.decoration.style::class] - ?: continue - - val webApiDecoration = change.decoration.toWebApiDecoration(template) - decorationApi.addDecoration(webApiDecoration, group) - } - is DecorationChange.Moved -> {} - is DecorationChange.Removed -> { - decorationApi.removeDecoration(change.id, group) - } - is DecorationChange.Updated -> { - decorationApi.removeDecoration(change.decoration.id, group) - val template = decorationTemplates[change.decoration.style::class] - ?: continue - val webApiDecoration = change.decoration.toWebApiDecoration(template) - decorationApi.addDecoration(webApiDecoration, group) - } + val oldAndUpdatedGroups = it.keys + lastDecorations.keys + for (group in oldAndUpdatedGroups) { + val updatedDecos = it[group].orEmpty() + val changes = lastDecorations[group].orEmpty() + .changesByHref(updatedDecos) + .values + .flatten() + + for (change in changes) { + when (change) { + is DecorationChange.Added -> { + val template = decorationTemplates[change.decoration.style::class] + ?: continue + + val webApiDecoration = change.decoration.toWebApiDecoration(template) + decorationApi.addDecoration(webApiDecoration, group) + } + is DecorationChange.Moved -> {} + is DecorationChange.Removed -> { + decorationApi.removeDecoration(change.id, group) + } + is DecorationChange.Updated -> { + decorationApi.removeDecoration(change.decoration.id, group) + val template = decorationTemplates[change.decoration.style::class] + ?: continue + val webApiDecoration = change.decoration.toWebApiDecoration(template) + decorationApi.addDecoration(webApiDecoration, group) } } } @@ -207,7 +211,7 @@ internal fun SingleViewportSpread( val decoration = decorations.value[group]?.firstOrNull { it.id.value == id } ?: return@SpreadWebView - val event = DecorationListener.OnActivatedEvent( + val event = DecorationListener.OnActivatedEvent( decoration = decoration, group = group, rect = rect, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 1d03845e64..0766445efb 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -364,9 +364,11 @@ internal fun ReflowableResource( var lastDecorations = emptyMap>() snapshotFlow { decorations.value } .onEach { - for ((group, decos) in it.entries) { + val oldAndUpdatesGroups = it.keys + lastDecorations.keys + for (group in oldAndUpdatesGroups) { + val updatedInGroup = it[group].orEmpty() val lastInGroup = lastDecorations[group].orEmpty() - for ((_, changes) in lastInGroup.changesByHref(decos)) { + for ((_, changes) in lastInGroup.changesByHref(updatedInGroup)) { for (change in changes) { when (change) { is DecorationChange.Added -> { From 9e54f23131a3f369dcf7a77cd02a504828fdd60c Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 15 Jan 2026 16:18:55 +0100 Subject: [PATCH 28/56] Fix single highlight ID for everyone in demo --- .../readium/demo/navigator/decorations/HighlightsManager.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt b/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt index 667167e2f5..0616647c7a 100644 --- a/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt +++ b/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt @@ -44,7 +44,7 @@ sealed class HighlightsManager( decorationFactory: (Highlight, Long) -> List>, ) { - private val lastHighlightId: Long = -1 + private var lastHighlightId: Long = -1 private val highlightsMutable: MutableStateFlow> = MutableStateFlow(persistentMapOf()) @@ -63,6 +63,8 @@ sealed class HighlightsManager( annotation: String = "", ): Long { val id = lastHighlightId + 1 + lastHighlightId += 1 + val highlight = Highlight( locator = locator, style = style, From 294be296143ff85db2622924f98faac86a2b5068 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 15 Jan 2026 17:14:17 +0100 Subject: [PATCH 29/56] Cosmetic changes in FXL --- .../web/fixedlayout/FixedWebRendition.kt | 82 ++++++++++--------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index 702928833b..391e3de54a 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -83,38 +83,38 @@ public fun FixedWebRendition( decorationListener: DecorationListener = defaultDecorationListener(state.controller), textSelectionActionModeCallback: ActionMode.Callback? = null, ) { - val layoutDirection = - state.layoutDelegate.overflow.value.readingProgression.toLayoutDirection() - - CompositionLocalProvider(LocalLayoutDirection provides layoutDirection) { - BoxWithConstraints( - modifier = modifier.fillMaxSize(), - propagateMinConstraints = true - ) { - val viewportSize = rememberUpdatedState(DpSize(maxWidth, maxHeight)) - - val safeDrawingPadding = windowInsets.asAbsolutePaddingValues() - - val displayArea = - rememberUpdatedState(DisplayArea(viewportSize.value, safeDrawingPadding)) + BoxWithConstraints( + modifier = modifier.fillMaxSize(), + propagateMinConstraints = true + ) { + val layoutDirection = + state.layoutDelegate.overflow.value.readingProgression.toLayoutDirection() + CompositionLocalProvider(LocalLayoutDirection provides layoutDirection) { if (state.controller == null) { - state.initController(location = state.currentLocation()) + val currentLocation = currentLocation(state.lastMeasureInfo.value, state.publication) + state.initController(location = currentLocation) } + val density = LocalDensity.current + val coroutineScope = rememberCoroutineScope() + val displayArea = rememberUpdatedState( + DisplayArea( + viewportSize = DpSize(maxWidth, maxHeight), + safeDrawingPadding = windowInsets.asAbsolutePaddingValues() + ) + ) + val inputListenerState = rememberUpdatedState(inputListener) val hyperlinkListenerState = rememberUpdatedState(hyperlinkListener) val decorationListenerState = rememberUpdatedState(decorationListener) - val density = LocalDensity.current - val scrollStates = remember(state, state.layoutDelegate.layout.value) { - state.layoutDelegate.layout.value.spreads - .map { SpreadScrollState() } + state.layoutDelegate.layout.value.spreads.map { SpreadScrollState() } } val flingBehavior = run { @@ -138,25 +138,25 @@ public fun FixedWebRendition( ) } - LaunchedEffect(state, state.layoutDelegate.layout.value) { + val spreadFlingBehavior = Scrollable2DDefaults.flingBehavior() + + val spreadNestedScrollConnection = remember(state.pagerState, scrollStates) { + SpreadNestedScrollConnection( + pagerState = state.pagerState, + resourceStates = scrollStates, + flingBehavior = spreadFlingBehavior + ) + } + + LaunchedEffect(state.lastMeasureInfo) { snapshotFlow { - state.pagerState.currentPage + state.lastMeasureInfo.value }.onEach { - state.navigationDelegate.updateLocation(state.currentLocation()) + val currentLocation = currentLocation(it, state.publication) + state.navigationDelegate.updateLocation(currentLocation) }.launchIn(this) } - val spreadFlingBehavior = Scrollable2DDefaults.flingBehavior() - - val spreadNestedScrollConnection = - remember(state.pagerState, scrollStates) { - SpreadNestedScrollConnection( - pagerState = state.pagerState, - resourceStates = scrollStates, - flingBehavior = spreadFlingBehavior - ) - } - RenditionPager( modifier = Modifier.nestedScroll(spreadNestedScrollConnection), state = state.pagerState, @@ -176,7 +176,7 @@ public fun FixedWebRendition( val decorations = state.decorationDelegate.decorations .mapValues { groupDecorations -> - groupDecorations.value.filter { it.location.href in spread.pages.map { it.href } } + groupDecorations.value.filter { spread.contains(it.location.href) } }.toImmutableMap() when (spread) { @@ -199,7 +199,7 @@ public fun FixedWebRendition( onTap = { inputListenerState.value.onTap( it, - TapContext(viewportSize.value) + TapContext(displayArea.value.viewportSize) ) }, onLinkActivated = { url, outerHtml -> @@ -244,7 +244,7 @@ public fun FixedWebRendition( onTap = { inputListenerState.value.onTap( it, - TapContext(viewportSize.value) + TapContext(displayArea.value.viewportSize) ) }, onLinkActivated = { url, outerHtml -> @@ -275,10 +275,12 @@ public fun FixedWebRendition( } } -private fun FixedWebRenditionState.currentLocation(): FixedWebLocation { - val lastMeasureInfoNow = lastMeasureInfo - val currentSpreadIndex = lastMeasureInfoNow.value.currentSpread - val currentLayout = lastMeasureInfoNow.value.layout +private fun currentLocation( + lastMeasureInfo: FixedLayoutMeasureInfo, + publication: FixedWebPublication, +): FixedWebLocation { + val currentSpreadIndex = lastMeasureInfo.currentSpread + val currentLayout = lastMeasureInfo.layout val itemIndex = currentLayout.pageIndexForSpread(currentSpreadIndex) val href = publication.readingOrder[itemIndex].href val mediaType = publication.readingOrder[itemIndex].mediaType From c8bb66592e9e67c1db80e7bffb05e6f01c54ee91 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 15 Jan 2026 18:21:51 +0100 Subject: [PATCH 30/56] Fix possible race condition in selection in FXL --- .../web/fixedlayout/FixedWebRendition.kt | 6 +++--- .../web/fixedlayout/FixedWebRenditionState.kt | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index 391e3de54a..14458a1fa7 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -92,7 +92,7 @@ public fun FixedWebRendition( CompositionLocalProvider(LocalLayoutDirection provides layoutDirection) { if (state.controller == null) { - val currentLocation = currentLocation(state.lastMeasureInfo.value, state.publication) + val currentLocation = currentLocation(state.lastMeasureInfoState.value, state.publication) state.initController(location = currentLocation) } @@ -148,9 +148,9 @@ public fun FixedWebRendition( ) } - LaunchedEffect(state.lastMeasureInfo) { + LaunchedEffect(state.lastMeasureInfoState) { snapshotFlow { - state.lastMeasureInfo.value + state.lastMeasureInfoState.value }.onEach { val currentLocation = currentLocation(it, state.publication) state.navigationDelegate.updateLocation(currentLocation) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 0a31f22298..0eade8c782 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -10,6 +10,7 @@ package org.readium.navigator.web.fixedlayout import android.app.Application import androidx.compose.foundation.MutatePriority +import androidx.compose.foundation.pager.PagerLayoutInfo import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.MutableState import androidx.compose.runtime.Stable @@ -90,9 +91,10 @@ public class FixedWebRenditionState internal constructor( override val controller: FixedWebRenditionController? by controllerState - internal val lastMeasureInfo: State = derivedStateOf { + internal val lastMeasureInfoState: State = derivedStateOf { FixedLayoutMeasureInfo( currentSpread = pagerState.currentPage, + pagerLayoutInfo = pagerState.layoutInfo, layout = Snapshot.withoutReadObservation { layoutDelegate.layout.value } ) } @@ -116,8 +118,7 @@ public class FixedWebRenditionState internal constructor( internal val selectionDelegate: FixedSelectionDelegate = FixedSelectionDelegate( - pagerState = pagerState, - lastMeasureInfo = lastMeasureInfo + lastMeasureInfoState = lastMeasureInfoState ) internal val decorationDelegate: FixedDecorationDelegate = @@ -156,7 +157,7 @@ public class FixedWebRenditionState internal constructor( navigationDelegate = FixedNavigationDelegate( pagerState, - lastMeasureInfo, + lastMeasureInfoState, layoutDelegate.overflow, location ) @@ -191,6 +192,7 @@ internal data class FixedWebPreloadedData( internal class FixedLayoutMeasureInfo( val currentSpread: Int, + val pagerLayoutInfo: PagerLayoutInfo, val layout: Layout, ) @@ -298,21 +300,21 @@ internal class FixedDecorationDelegate( } internal class FixedSelectionDelegate( - private val pagerState: PagerState, - private val lastMeasureInfo: State, + private val lastMeasureInfoState: State, ) : SelectionController { val selectionApis: SnapshotStateMap = mutableStateMapOf() override suspend fun currentSelection(): Selection? { - val visiblePages = pagerState.layoutInfo.visiblePagesInfo.map { it.index } + val lastMeasureInfoNow = lastMeasureInfoState.value + val visiblePages = lastMeasureInfoNow.pagerLayoutInfo.visiblePagesInfo.map { it.index } val coroutineScope = CoroutineScope(currentCoroutineContext() + SupervisorJob()) val (page, selection) = visiblePages .mapNotNull { index -> selectionApis[index]?.let { index to it } } .map { (index, api) -> coroutineScope.async { - api.getCurrentSelection(index, lastMeasureInfo.value.layout) + api.getCurrentSelection(index, lastMeasureInfoNow.layout) } }.awaitAll() .filterNotNull() From 0dccaf31b49ee5661f3d79f070302ec9bd727aee Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 16 Jan 2026 12:57:25 +0100 Subject: [PATCH 31/56] Use lineLength in scroll mode --- .../web/fixedlayout/FixedWebRendition.kt | 13 +- .../navigator/web/internals/util/Padding.kt | 15 ++ .../web/reflowable/ReflowableWebRendition.kt | 6 +- .../reflowable/ReflowableWebRenditionState.kt | 18 +-- .../{PaginatedLayout.kt => LayoutResolver.kt} | 147 +++++++++++------- .../web/reflowable/css/ReadiumCssInjector.kt | 9 +- .../reflowable/css/ReadiumCssProperties.kt | 6 +- 7 files changed, 124 insertions(+), 90 deletions(-) rename readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/{PaginatedLayout.kt => LayoutResolver.kt} (55%) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index 14458a1fa7..aa61e0ed3a 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -56,9 +56,9 @@ import org.readium.navigator.web.internals.pager.RenditionPager import org.readium.navigator.web.internals.pager.RenditionScrollState import org.readium.navigator.web.internals.pager.pagingFlingBehavior import org.readium.navigator.web.internals.server.WebViewServer -import org.readium.navigator.web.internals.util.AbsolutePaddingValues import org.readium.navigator.web.internals.util.DisplayArea import org.readium.navigator.web.internals.util.HyperlinkProcessor +import org.readium.navigator.web.internals.util.asAbsolutePaddingValues import org.readium.navigator.web.internals.util.toLayoutDirection import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.AbsoluteUrl @@ -289,17 +289,6 @@ private fun currentLocation( return FixedWebLocation(href, position, totalProgression, mediaType) } -@Composable -private fun WindowInsets.asAbsolutePaddingValues(): AbsolutePaddingValues { - val density = LocalDensity.current - val layoutDirection = LocalLayoutDirection.current - val top = with(density) { getTop(density).toDp() } - val right = with(density) { getRight(density, layoutDirection).toDp() } - val bottom = with(density) { getBottom(density).toDp() } - val left = with(density) { getLeft(density, layoutDirection).toDp() } - return AbsolutePaddingValues(top = top, right = right, bottom = bottom, left = left) -} - private suspend fun HyperlinkProcessor.onLinkActivated( url: Url, outerHtml: String, diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt index 33ce0b234d..c0cc329d0b 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt @@ -6,8 +6,12 @@ package org.readium.navigator.web.internals.util +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.absolutePadding +import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp @@ -35,3 +39,14 @@ public fun Modifier.absolutePadding(paddingValues: AbsolutePaddingValues): Modif bottom = paddingValues.bottom, left = paddingValues.left ) + +@Composable +public fun WindowInsets.asAbsolutePaddingValues(): AbsolutePaddingValues { + val density = LocalDensity.current + val layoutDirection = LocalLayoutDirection.current + val top = with(density) { getTop(density).toDp() } + val right = with(density) { getRight(density, layoutDirection).toDp() } + val bottom = with(density) { getBottom(density).toDp() } + val left = with(density) { getLeft(density, layoutDirection).toDp() } + return AbsolutePaddingValues(top = top, right = right, bottom = bottom, left = left) +} diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index 7049036eb3..6295b13666 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -36,7 +36,6 @@ import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.max import kotlinx.collections.immutable.toImmutableMap import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -55,6 +54,7 @@ import org.readium.navigator.web.internals.pager.pagingFlingBehavior import org.readium.navigator.web.internals.server.WebViewServer import org.readium.navigator.web.internals.util.AbsolutePaddingValues import org.readium.navigator.web.internals.util.HyperlinkProcessor +import org.readium.navigator.web.internals.util.asAbsolutePaddingValues import org.readium.navigator.web.internals.util.rememberUpdatedRef import org.readium.navigator.web.internals.util.toLayoutDirection import org.readium.navigator.web.reflowable.resource.ReflowablePagingLayoutInfo @@ -94,9 +94,7 @@ public fun ReflowableWebRendition( state.layoutDelegate.viewportSize = viewportSize.value - state.layoutDelegate.horizontalSafeDrawing = windowInsets.asPaddingValues().let { - max(it.calculateLeftPadding(layoutDirection), it.calculateRightPadding(layoutDirection)) - } + state.layoutDelegate.safeDrawing = windowInsets.asAbsolutePaddingValues() state.layoutDelegate.fontScale = LocalDensity.current.fontScale diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index aa479114d1..7845600333 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -20,7 +20,6 @@ import androidx.compose.runtime.mutableStateMapOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp import kotlin.coroutines.suspendCoroutine @@ -48,12 +47,13 @@ import org.readium.navigator.web.internals.pager.RenditionScrollState import org.readium.navigator.web.internals.server.WebViewClient import org.readium.navigator.web.internals.server.WebViewServer import org.readium.navigator.web.internals.server.WebViewServer.Companion.assetsBaseHref +import org.readium.navigator.web.internals.util.AbsolutePaddingValues import org.readium.navigator.web.internals.util.HyperlinkProcessor import org.readium.navigator.web.internals.util.toLayoutDirection import org.readium.navigator.web.internals.util.toOrientation import org.readium.navigator.web.internals.webapi.ReflowableSelectionApi import org.readium.navigator.web.internals.webview.WebViewScrollController -import org.readium.navigator.web.reflowable.css.PaginatedLayoutResolver +import org.readium.navigator.web.reflowable.css.LayoutResolver import org.readium.navigator.web.reflowable.css.ReadiumCssInjector import org.readium.navigator.web.reflowable.css.RsProperties import org.readium.navigator.web.reflowable.css.UserProperties @@ -309,8 +309,8 @@ internal class ReflowableLayoutDelegate( initialSettings: ReflowableWebSettings, ) : SettingsController { - private val paginatedLayoutResolver = - PaginatedLayoutResolver( + private val layoutResolver = + LayoutResolver( baseMinMargins = 15.dp, baseMinLineLength = 400.dp, baseOptimalLineLength = 600.dp, @@ -319,7 +319,7 @@ internal class ReflowableLayoutDelegate( internal var viewportSize: DpSize? by mutableStateOf(null) - internal var horizontalSafeDrawing: Dp? by mutableStateOf(null) + internal var safeDrawing: AbsolutePaddingValues? by mutableStateOf(null) internal var fontScale: Float? by mutableStateOf(null) @@ -346,15 +346,15 @@ internal class ReflowableLayoutDelegate( ).withSettings( settings = settings, ).let { injector -> - if (viewportSize == null || horizontalSafeDrawing == null || fontScale == null || settings.scroll) { + if (viewportSize == null || safeDrawing == null || fontScale == null) { injector } else { injector.withLayout( - paginatedLayoutResolver.layout( + layoutResolver.layout( settings = settings, systemFontScale = fontScale!!, - viewportWidth = viewportSize!!.width, - horizontalSafeDrawing = horizontalSafeDrawing!! + viewportSize = viewportSize!!, + safeDrawing = safeDrawing!! ) ) } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/LayoutResolver.kt similarity index 55% rename from readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt rename to readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/LayoutResolver.kt index 06b0e8e48f..feecc98bfe 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/PaginatedLayout.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/LayoutResolver.kt @@ -9,59 +9,66 @@ package org.readium.navigator.web.reflowable.css import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.DpSize +import androidx.compose.ui.unit.coerceAtLeast import androidx.compose.ui.unit.coerceAtMost import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.max import kotlin.math.floor import kotlin.math.roundToInt +import org.readium.navigator.web.internals.util.AbsolutePaddingValues import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings import org.readium.r2.shared.ExperimentalReadiumApi -internal data class PaginatedLayout( +internal data class Layout( val colCount: Int, - val lineLength: Dp?, - val pageGutter: Dp, + val lineLength: Dp, ) -internal class PaginatedLayoutResolver( +internal class LayoutResolver( private val baseMinMargins: Dp, private val baseOptimalLineLength: Dp, private val baseMinLineLength: Dp, private val baseMaxLineLength: Dp, ) { - fun layout( settings: ReflowableWebSettings, systemFontScale: Float, - viewportWidth: Dp, - horizontalSafeDrawing: Dp, - ): PaginatedLayout { - val fontScale = systemFontScale * settings.fontSize.toFloat() - val minPageGutter = - (baseMinMargins * settings.minMargins.toFloat()).coerceAtLeast(horizontalSafeDrawing) + viewportSize: DpSize, + safeDrawing: AbsolutePaddingValues, + ): Layout { val optimalLineLength = - baseOptimalLineLength * settings.optimalLineLength.toFloat() * fontScale + baseOptimalLineLength * settings.optimalLineLength.toFloat() * systemFontScale val minLineLength = - settings.minimalLineLength?.let { baseMinLineLength * it.toFloat() * fontScale } + settings.minimalLineLength?.let { baseMinLineLength * it.toFloat() * systemFontScale } val maxLineLength = - settings.maximalLineLength?.let { baseMaxLineLength * it.toFloat() * fontScale } + settings.maximalLineLength?.let { baseMaxLineLength * it.toFloat() * systemFontScale } + val minMargins = + baseMinMargins * settings.minMargins.toFloat() * systemFontScale + + val actualMinMargins = when (settings.verticalText) { + true -> { + minMargins.coerceAtLeast(max(safeDrawing.top, safeDrawing.bottom)) + } + false -> { + minMargins.coerceAtLeast(max(safeDrawing.left, safeDrawing.right)) + } + } - var layout = when (val colCount = settings.columnCount) { - null -> - layoutAuto( - minimalPageGutter = minPageGutter, - viewportWidth = viewportWidth, + var layout = when (settings.scroll) { + true -> scrolledLayout( + viewportSize = if (settings.verticalText) viewportSize.height else viewportSize.width, + minimalMargins = actualMinMargins, + maximalLineLength = maxLineLength + ) + false -> + paginatedLayout( + viewportWidth = viewportSize.width, + requestedColCount = settings.columnCount, + minimalMargins = actualMinMargins, optimalLineLength = optimalLineLength, maximalLineLength = maxLineLength, - - ) - - else -> - layoutNColumns( - colCount = colCount, - minimalPageGutter = minPageGutter, - viewportWidth = viewportWidth, - maximalLineLength = maxLineLength, - minimalLineLength = minLineLength, + minimalLineLength = minLineLength ) } @@ -69,25 +76,65 @@ internal class PaginatedLayoutResolver( // the zoom factor so we need to do the reverse thing. // If we don't, line length decreases with fontSize. layout = layout.copy( - lineLength = layout.lineLength?.let { (it.value / settings.fontSize).dp }, - pageGutter = (layout.pageGutter.value / settings.fontSize).dp + lineLength = (layout.lineLength.value / settings.fontSize).dp, ) - // Readium CSS lineLength is a max-width property on body including pageGutter which is - // padding. - layout = layout.copy( - lineLength = layout.lineLength?.let { it + layout.pageGutter * 2 } + return layout + } + + private fun scrolledLayout( + viewportSize: Dp, + minimalMargins: Dp, + maximalLineLength: Dp?, + ): Layout { + val minMargins = minimalMargins.coerceAtMost(viewportSize) + + val availableSize = viewportSize - minMargins * 2 + + val maximalLineLength = maximalLineLength?.coerceAtLeast(minMargins * 2) + + val lineLength = availableSize.coerceAtMost(maximalLineLength ?: availableSize) + + return Layout( + colCount = 1, + lineLength = lineLength ) + } - return layout + private fun paginatedLayout( + viewportWidth: Dp, + requestedColCount: Int?, + minimalMargins: Dp, + optimalLineLength: Dp, + maximalLineLength: Dp?, + minimalLineLength: Dp?, + ): Layout { + return when (requestedColCount) { + null -> + paginatedLayoutAuto( + minimalPageGutter = minimalMargins, + viewportWidth = viewportWidth, + optimalLineLength = optimalLineLength, + maximalLineLength = maximalLineLength, + + ) + else -> + paginatedLayoutNColumns( + colCount = requestedColCount, + minimalMargins = minimalMargins, + viewportWidth = viewportWidth, + maximalLineLength = maximalLineLength, + minimalLineLength = minimalLineLength, + ) + } } - private fun layoutAuto( + private fun paginatedLayoutAuto( minimalPageGutter: Dp, optimalLineLength: Dp, viewportWidth: Dp, maximalLineLength: Dp?, - ): PaginatedLayout { + ): Layout { /* * marginWidth = 2 * pageGutter * colCount * colCount = (viewportWidth - marginWidth) / optimalLineLength @@ -112,21 +159,17 @@ internal class PaginatedLayoutResolver( .let { it.coerceAtMost(maximalLineLength ?: it) } .coerceAtMost((viewportWidth - minMarginWidth) / colCount) - val finalMarginWidth = (viewportWidth - lineLength * colCount) - - val pageGutter = finalMarginWidth / colCount / 2 - - return PaginatedLayout(colCount, lineLength, pageGutter) + return Layout(colCount, lineLength) } - private fun layoutNColumns( + private fun paginatedLayoutNColumns( colCount: Int, - minimalPageGutter: Dp, + minimalMargins: Dp, viewportWidth: Dp, minimalLineLength: Dp?, maximalLineLength: Dp?, - ): PaginatedLayout { - val minPageGutter = minimalPageGutter.coerceAtMost(viewportWidth) + ): Layout { + val minPageGutter = minimalMargins.coerceAtMost(viewportWidth) val actualAvailableWidth = viewportWidth - minPageGutter * 2 * colCount @@ -138,24 +181,22 @@ internal class PaginatedLayoutResolver( return when { minimalLineLength != null && lineLength < minimalLineLength -> - layoutNColumns( + paginatedLayoutNColumns( colCount = colCount - 1, - minimalPageGutter = minPageGutter, + minimalMargins = minPageGutter, viewportWidth = viewportWidth, minimalLineLength = minimalLineLength, maximalLineLength = maximalLineLength ) maximalLineLength != null && lineLength > maximalLineLength -> - PaginatedLayout( + Layout( colCount = colCount, lineLength = maximalLineLength, - pageGutter = minPageGutter, ) else -> - PaginatedLayout( + Layout( colCount = colCount, lineLength = lineLength, - pageGutter = minPageGutter, ) } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt index b98dc134d4..9be5c05be5 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt @@ -335,7 +335,6 @@ internal fun ReadiumCssInjector.withSettings(settings: ReflowableWebSettings): R copy( layout = ReadiumCssLayout.from(settings), rsProperties = rsProperties.copy( - pageGutter = Length.Px(20.0 * minMargins), textColor = textColor.toCss(), backgroundColor = backgroundColor.toCss(), linkColor = linkColor.toCss(), @@ -346,7 +345,6 @@ internal fun ReadiumCssInjector.withSettings(settings: ReflowableWebSettings): R false -> View.PAGED true -> View.SCROLL }, - colCount = columnCount, darkenImages = imageFilter == ImageFilter.DARKEN, invertImages = imageFilter == ImageFilter.INVERT, textColor = textColor.toCss().takeIf { overridePublisherColors }, @@ -388,13 +386,10 @@ internal fun ReadiumCssInjector.withSettings(settings: ReflowableWebSettings): R } internal fun ReadiumCssInjector.withLayout( - viewportLayout: PaginatedLayout, + viewportLayout: Layout, ): ReadiumCssInjector = copy( - rsProperties = rsProperties.copy( - pageGutter = Length.Px(viewportLayout.pageGutter.value.toDouble()) - ), userProperties = userProperties.copy( colCount = viewportLayout.colCount, - lineLength = viewportLayout.lineLength?.let { Length.Px(it.value.toDouble()) } + lineLength = Length.Px(viewportLayout.lineLength.value.toDouble()) ) ) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt index 497937347d..c269117279 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt @@ -9,7 +9,6 @@ package org.readium.navigator.web.reflowable.css import androidx.annotation.ColorInt -import java.text.NumberFormat import java.util.* import kotlin.collections.iterator import org.readium.r2.shared.ExperimentalReadiumApi @@ -562,7 +561,4 @@ private fun String.toCss(): String = * Converts a [Double] to a string literal with the given [unit]. */ private fun Double.toCss(unit: String): String = - NumberFormat.getNumberInstance(Locale.ROOT).run { - maximumFractionDigits = 2 - format(this@toCss) - } + unit + String.format(Locale.ROOT, "%e%s", this, unit) From 03ebc98fe4af0299696a16e525cac2ab85e72a47 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 16 Jan 2026 14:11:46 +0100 Subject: [PATCH 32/56] Update Readium CSS --- .../web/internals/scripts/package.json | 2 +- .../web/internals/scripts/pnpm-lock.yaml | 64 ++-- .../internals/generated/readium-css/ReadMe.md | 6 +- .../readium-css/ReadiumCSS-after.css | 271 +++++++--------- .../readium-css/ReadiumCSS-before.css | 72 ++--- .../readium-css/ReadiumCSS-default.css | 17 +- .../ReadiumCSS-ebpaj_fonts_patch.css | 2 +- .../readium-css/android-fonts-patch/ReadMe.md | 2 +- .../android-fonts-patch.css | 4 +- .../cjk-horizontal/ReadiumCSS-after.css | 219 +++++-------- .../cjk-horizontal/ReadiumCSS-before.css | 72 ++--- .../cjk-horizontal/ReadiumCSS-default.css | 17 +- .../cjk-vertical/ReadiumCSS-after.css | 216 ++++--------- .../cjk-vertical/ReadiumCSS-before.css | 72 ++--- .../cjk-vertical/ReadiumCSS-default.css | 17 +- .../readium-css/rtl/ReadiumCSS-after.css | 239 ++++++--------- .../readium-css/rtl/ReadiumCSS-before.css | 72 ++--- .../readium-css/rtl/ReadiumCSS-default.css | 17 +- .../readium-css/webPub/ReadiumCSS-webPub.css | 290 ++++++++++++++++++ .../web/reflowable/css/ReadiumCssInjector.kt | 1 - .../reflowable/css/ReadiumCssProperties.kt | 17 +- 21 files changed, 876 insertions(+), 813 deletions(-) create mode 100644 readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/webPub/ReadiumCSS-webPub.css diff --git a/readium/navigators/web/internals/scripts/package.json b/readium/navigators/web/internals/scripts/package.json index 618b1bc67b..5e162a9012 100644 --- a/readium/navigators/web/internals/scripts/package.json +++ b/readium/navigators/web/internals/scripts/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@babel/core": "^7.23.0", "@babel/preset-env": "^7.22.20", - "@readium/css": "2.0.0-beta.13", + "@readium/css": "2.0.0-beta.24", "@types/string.prototype.matchall": "^4.0.4", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", diff --git a/readium/navigators/web/internals/scripts/pnpm-lock.yaml b/readium/navigators/web/internals/scripts/pnpm-lock.yaml index 6c0d260386..8d1d8f1c00 100644 --- a/readium/navigators/web/internals/scripts/pnpm-lock.yaml +++ b/readium/navigators/web/internals/scripts/pnpm-lock.yaml @@ -22,7 +22,7 @@ dependencies: version: 4.0.10 ts-loader: specifier: ^9.5.1 - version: 9.5.1(typescript@5.8.3)(webpack@5.88.2) + version: 9.5.1(typescript@5.9.3)(webpack@5.88.2) devDependencies: '@babel/core': @@ -32,17 +32,17 @@ devDependencies: specifier: ^7.22.20 version: 7.22.20(@babel/core@7.23.0) '@readium/css': - specifier: 2.0.0-beta.13 - version: 2.0.0-beta.13 + specifier: 2.0.0-beta.24 + version: 2.0.0-beta.24 '@types/string.prototype.matchall': specifier: ^4.0.4 version: 4.0.4 '@typescript-eslint/eslint-plugin': specifier: ^8.3.0 - version: 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.8.3) + version: 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.9.3) '@typescript-eslint/parser': specifier: ^8.3.0 - version: 8.3.0(eslint@8.57.0)(typescript@5.8.3) + version: 8.3.0(eslint@8.57.0)(typescript@5.9.3) babel-loader: specifier: ^8.3.0 version: 8.3.0(@babel/core@7.23.0)(webpack@5.88.2) @@ -1556,8 +1556,8 @@ packages: fastq: 1.17.1 dev: true - /@readium/css@2.0.0-beta.13: - resolution: {integrity: sha512-45WweTkywrRmPiaKE0gCKOxyMJjCyNzv/FG4H31vxeOdmGpZXeoQSpK7jm5DGnrlCUHUPQzkLSwJtNJhXBY3AQ==} + /@readium/css@2.0.0-beta.24: + resolution: {integrity: sha512-vBI5Sw6JwlbTuDBvcD/ahJZqw2NGe1CDGQ7msAByc/491Q8V76baCkYIMFWyj5gPS1GS9oltlmIAWZAzxx3djg==} dev: true /@rollup/rollup-android-arm-eabi@4.20.0: @@ -1722,7 +1722,7 @@ packages: resolution: {integrity: sha512-E0KMS5FrWafbfKTGsoTZgrPHxBVknPeBxUTNwJima3t5KLdOlY285sisQC0mkVPTNNBc4nxza5ldly/ct+ISrQ==} dev: true - /@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.8.3): + /@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0)(eslint@8.57.0)(typescript@5.9.3): resolution: {integrity: sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1734,22 +1734,22 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/parser': 8.3.0(eslint@8.57.0)(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.3.0 - '@typescript-eslint/type-utils': 8.3.0(eslint@8.57.0)(typescript@5.8.3) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.3.0(eslint@8.57.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.3.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 1.3.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.8.3): + /@typescript-eslint/parser@8.3.0(eslint@8.57.0)(typescript@5.9.3): resolution: {integrity: sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1761,11 +1761,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 8.3.0 '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.3.0 debug: 4.3.4 eslint: 8.57.0 - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color dev: true @@ -1778,7 +1778,7 @@ packages: '@typescript-eslint/visitor-keys': 8.3.0 dev: true - /@typescript-eslint/type-utils@8.3.0(eslint@8.57.0)(typescript@5.8.3): + /@typescript-eslint/type-utils@8.3.0(eslint@8.57.0)(typescript@5.9.3): resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1787,11 +1787,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.3.0(eslint@8.57.0)(typescript@5.9.3) debug: 4.3.4 - ts-api-utils: 1.3.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 1.3.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - eslint - supports-color @@ -1802,7 +1802,7 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true - /@typescript-eslint/typescript-estree@8.3.0(typescript@5.8.3): + /@typescript-eslint/typescript-estree@8.3.0(typescript@5.9.3): resolution: {integrity: sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1818,13 +1818,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 1.3.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@8.3.0(eslint@8.57.0)(typescript@5.8.3): + /@typescript-eslint/utils@8.3.0(eslint@8.57.0)(typescript@5.9.3): resolution: {integrity: sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1833,7 +1833,7 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.3.0 '@typescript-eslint/types': 8.3.0 - '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.9.3) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -3772,16 +3772,16 @@ packages: dependencies: is-number: 7.0.0 - /ts-api-utils@1.3.0(typescript@5.8.3): + /ts-api-utils@1.3.0(typescript@5.9.3): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.8.3 + typescript: 5.9.3 dev: true - /ts-loader@9.5.1(typescript@5.8.3)(webpack@5.88.2): + /ts-loader@9.5.1(typescript@5.9.3)(webpack@5.88.2): resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} engines: {node: '>=12.0.0'} peerDependencies: @@ -3793,7 +3793,7 @@ packages: micromatch: 4.0.7 semver: 7.5.4 source-map: 0.7.4 - typescript: 5.8.3 + typescript: 5.9.3 webpack: 5.88.2(webpack-cli@5.1.4) dev: false @@ -3847,8 +3847,8 @@ packages: is-typed-array: 1.1.12 dev: false - /typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + /typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} hasBin: true diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadMe.md b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadMe.md index 518fe6289e..a5588f5585 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadMe.md +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadMe.md @@ -27,10 +27,6 @@ Disabled user settings: - `hyphens`; - `letter-spacing`. -Added user settings: - -- `font-variant-ligatures` (mapped to `--USER__ligatures` CSS variable). - ## CJK Chinese, Japanese, Korean, and Mongolian can be either written `horizontal-tb` or `vertical-*`. Consequently, there are stylesheets for horizontal and vertical writing modes. @@ -52,6 +48,7 @@ Disabled user settings: - `text-align`; - `hyphens`; +- `ligatures`; - paragraphs’ indent; - `word-spacing`. @@ -88,6 +85,7 @@ Disabled user settings: - `column-count` (number of columns); - `text-align`; - `hyphens`; +- `ligatures`; - paragraphs’ indent; - `word-spacing`. diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-after.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-after.css index 9feb56ecef..2138d20c69 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-after.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-after.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -66,17 +73,20 @@ body{ max-width:var(--RS__defaultLineLength) !important; padding:0 var(--RS__pageGutter) !important; margin:0 auto !important; - overflow:hidden; box-sizing:border-box; } +:root:not([style*="readium-noOverflow-on"]) body{ + overflow:hidden; +} + @supports (overflow: clip){ - :root{ + :root:not([style*="readium-noOverflow-on"]){ overflow:clip; } - body{ + :root:not([style*="readium-noOverflow-on"]) body{ overflow:clip; overflow-clip-margin:content-box; } @@ -96,157 +106,38 @@ body{ :root[style*="readium-scroll-on"] body{ max-width:var(--RS__defaultLineLength) !important; + box-sizing:border-box !important; +} + +:root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:auto; } @supports (overflow: clip){ - :root[style*="readium-scroll-on"]{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]){ overflow:auto; } - :root[style*="readium-scroll-on"] body{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:clip; } } -:root[style*="readium-night-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#0099E5; - - --RS__linkColor:#63caff; - - --RS__textColor:#FEFEFE; - - --RS__backgroundColor:#000000; -} - -:root[style*="readium-night-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; - border-color:currentcolor !important; -} - -:root[style*="readium-night-on"] svg text{ - fill:currentcolor !important; - stroke:none !important; -} - -:root[style*="readium-night-on"] a:link, -:root[style*="readium-night-on"] a:link *{ - color:var(--RS__linkColor) !important; -} - -:root[style*="readium-night-on"] a:visited, -:root[style*="readium-night-on"] a:visited *{ - color:var(--RS__visitedColor) !important; -} - -:root[style*="readium-night-on"] img[class*="gaiji"], -:root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, -:root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:invert(100%); - filter:invert(100%); -} - -:root[style*="readium-sepia-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#faf4e8; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{ + padding-top:var(--RS__scrollPaddingTop) !important; } -:root[style*="readium-sepia-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{ + padding-bottom:var(--RS__scrollPaddingBottom) !important; } -:root[style*="readium-sepia-on"] a:link, -:root[style*="readium-sepia-on"] a:link *{ - color:var(--RS__linkColor); +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{ + padding-left:var(--RS__scrollPaddingLeft) !important; } -:root[style*="readium-sepia-on"] a:visited, -:root[style*="readium-sepia-on"] a:visited *{ - color:var(--RS__visitedColor); -} - -@media screen and (-ms-high-contrast: active){ - - :root{ - color:windowText !important; - background-color:window !important; - } - - :root :not(#\#):not(#\#):not(#\#), - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#){ - color:inherit !important; - background-color:inherit !important; - } - - .readiumCSS-mo-active-default{ - color:highlightText !important; - background-color:highlight !important; - } -} - -@media screen and (-ms-high-contrast: white-on-black){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (inverted-colors){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (monochrome){ -} - -@media screen and (prefers-reduced-motion){ +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{ + padding-right:var(--RS__scrollPaddingRight) !important; } :root[style*="--USER__backgroundColor"]{ @@ -323,7 +214,15 @@ body{ } :root[style*="--USER__textAlign"] body, -:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(hgroup p), +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +), :root[style*="--USER__textAlign"] li, :root[style*="--USER__textAlign"] dd{ text-align:var(--USER__textAlign) !important; @@ -352,56 +251,90 @@ body{ hyphens:inherit; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"]{ +:root[style*="--USER__fontFamily"]{ font-family:var(--USER__fontFamily) !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"] *{ +:root[style*="--USER__fontFamily"] *{ font-family:revert !important; } -:root[style*="readium-font-on"][style*="AccessibleDfA"]{ +:root[style*="AccessibleDfA"]{ font-family:AccessibleDfA, Verdana, Tahoma, "Trebuchet MS", sans-serif !important; } -:root[style*="readium-font-on"][style*="IA Writer Duospace"]{ +:root[style*="IA Writer Duospace"]{ font-family:"IA Writer Duospace", Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Courier, monospace !important; } -:root[style*="readium-font-on"][style*="AccessibleDfA"],:root[style*="readium-font-on"][style*="IA Writer Duospace"], +:root[style*="AccessibleDfA"],:root[style*="IA Writer Duospace"], :root[style*="readium-a11y-on"]{ font-style:normal !important; font-weight:normal !important; } -:root[style*="readium-font-on"][style*="AccessibleDfA"] *:not(code):not(var):not(kbd):not(samp),:root[style*="readium-font-on"][style*="IA Writer Duospace"] *:not(code):not(var):not(kbd):not(samp), -:root[style*="readium-a11y-on"] *:not(code):not(var):not(kbd):not(samp){ +:root[style*="AccessibleDfA"] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp), +:root[style*="readium-a11y-on"] body *:not(code):not(var):not(kbd):not(samp){ font-family:inherit !important; font-style:inherit !important; font-weight:inherit !important; } -:root[style*="readium-font-on"][style*="AccessibleDfA"] *,:root[style*="readium-font-on"][style*="IA Writer Duospace"] *, -:root[style*="readium-a11y-on"] *{ +:root[style*="AccessibleDfA"] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a), +:root[style*="readium-a11y-on"] body *:not(a){ text-decoration:none !important; +} + +:root[style*="AccessibleDfA"] body *,:root[style*="IA Writer Duospace"] body *, +:root[style*="readium-a11y-on"] body *{ font-variant-caps:normal !important; font-variant-numeric:normal !important; font-variant-position:normal !important; } -:root[style*="readium-font-on"][style*="AccessibleDfA"] sup,:root[style*="readium-font-on"][style*="IA Writer Duospace"] sup, +:root[style*="AccessibleDfA"] sup,:root[style*="IA Writer Duospace"] sup, :root[style*="readium-a11y-on"] sup, -:root[style*="readium-font-on"][style*="AccessibleDfA"] sub, -:root[style*="readium-font-on"][style*="IA Writer Duospace"] sub, +:root[style*="AccessibleDfA"] sub, +:root[style*="IA Writer Duospace"] sub, :root[style*="readium-a11y-on"] sub{ font-size:1rem !important; vertical-align:baseline !important; } -:root:not([style*="readium-deprecatedFontSize-on"])[style*="--USER__fontSize"] body{ +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] body{ zoom:var(--USER__fontSize) !important; } +:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{ + -webkit-text-size-adjust:var(--USER__fontSize) !important; +} + +@supports selector(figure:has(> img)){ + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{ + zoom:calc(100% / var(--USER__fontSize)) !important; + } + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{ + zoom:var(--USER__fontSize) !important; + } +} + @supports not (zoom: 1){ :root[style*="--USER__fontSize"]{ @@ -429,7 +362,15 @@ body{ margin-bottom:var(--USER__paraSpacing) !important; } -:root[style*="--USER__paraIndent"] p{ +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +){ text-indent:var(--USER__paraIndent) !important; } @@ -467,20 +408,28 @@ body{ font-variant:none; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] body{ +:root[style*="--USER__ligatures"]{ + font-variant-ligatures:var(--USER__ligatures) !important; +} + +:root[style*="--USER__ligatures"] *{ + font-variant-ligatures:inherit !important; +} + +:root[style*="--USER__fontWeight"] body{ font-weight:var(--USER__fontWeight) !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] b, -:root[style*="readium-font-on"][style*="--USER__fontWeight"] strong{ +:root[style*="--USER__fontWeight"] b, +:root[style*="--USER__fontWeight"] strong{ font-weight:bolder; } -:root[style*="readium-font-on"][style*="--USER__fontWidth"] body{ +:root[style*="--USER__fontWidth"] body{ font-stretch:var(--USER__fontWidth) !important; } -:root[style*="readium-font-on"][style*="--USER__fontOpticalSizing"] body{ +:root[style*="--USER__fontOpticalSizing"] body{ font-optical-sizing:var(--USER__fontOpticalSizing) !important; } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-before.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-before.css index 0cc5938f7b..1c3b0ff066 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-before.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-before.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -38,6 +45,31 @@ --RS__lineHeightCompensation:1; --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); + + --RS__selectionTextColor:inherit; + + --RS__selectionBackgroundColor:#b4d8fe; + + --RS__visitedColor:#551A8B; + + --RS__linkColor:#0000EE; + + --RS__textColor:#121212; + + --RS__backgroundColor:#FFFFFF; + color:var(--RS__textColor) !important; + + background-color:var(--RS__backgroundColor) !important; +} + +::-moz-selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); +} + +::selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); } html{ @@ -193,36 +225,6 @@ math{ --RS__lineHeightCompensation:1.167; } -:root{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#FFFFFF; -} - -:root{ - color:var(--RS__textColor) !important; - background-color:var(--RS__backgroundColor) !important; -} - -::-moz-selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - -::selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - @font-face{ font-family:AccessibleDfA; font-style:normal; diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-default.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-default.css index c05d1d8ec8..fdd4363c80 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-default.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-default.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-ebpaj_fonts_patch.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-ebpaj_fonts_patch.css index ee7623c415..16da6be425 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-ebpaj_fonts_patch.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/ReadiumCSS-ebpaj_fonts_patch.css @@ -3,7 +3,7 @@ A stylesheet improving EBPAJ @font-face declarations to cover all platforms - Repo: https://github.com/readium/readium-css */ + Repo: https://github.com/readium/css */ /* EBPAJ template only references fonts from MS Windows… so we must reference fonts from other platforms diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/ReadMe.md b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/ReadMe.md index 7c3c6474d0..6b286e2de0 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/ReadMe.md +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/ReadMe.md @@ -2,7 +2,7 @@ This patch is intended to fix a Fixed-Layout issue on Android, and only on this platform. **It doesn’t apply to reflowable EPUBs or any other platform.** -See https://github.com/readium/readium-css/issues/149 +See https://github.com/readium/css/issues/149 ## What it does diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/android-fonts-patch.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/android-fonts-patch.css index 37e71aa959..87acc80ea4 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/android-fonts-patch.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/android-fonts-patch/android-fonts-patch.css @@ -3,13 +3,13 @@ A stylesheet aligning Android generic serif and sans-serif fonts on other platforms - Repo: https://github.com/readium/readium-css */ + Repo: https://github.com/readium/css */ /* Android resolves sans-serif to Roboto, and serif to Droid Serif This created issues for FXL EPUBs relying on Times (New Roman), Helvetica or Arial while not embedding the font files in the package. - See https://github.com/readium/readium-css/issues/149 + See https://github.com/readium/css/issues/149 Unfortunately it is no possible to target generic family using @font-face, we have to target specific font-family names e.g. Times, Arial, etc. diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-after.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-after.css index a43234fc65..468152166a 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-after.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-after.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -66,17 +73,20 @@ body{ max-width:var(--RS__defaultLineLength) !important; padding:0 var(--RS__pageGutter) !important; margin:0 auto !important; - overflow:hidden; box-sizing:border-box; } +:root:not([style*="readium-noOverflow-on"]) body{ + overflow:hidden; +} + @supports (overflow: clip){ - :root{ + :root:not([style*="readium-noOverflow-on"]){ overflow:clip; } - body{ + :root:not([style*="readium-noOverflow-on"]) body{ overflow:clip; overflow-clip-margin:content-box; } @@ -96,157 +106,38 @@ body{ :root[style*="readium-scroll-on"] body{ max-width:var(--RS__defaultLineLength) !important; + box-sizing:border-box !important; +} + +:root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:auto; } @supports (overflow: clip){ - :root[style*="readium-scroll-on"]{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]){ overflow:auto; } - :root[style*="readium-scroll-on"] body{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:clip; } } -:root[style*="readium-night-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#0099E5; - - --RS__linkColor:#63caff; - - --RS__textColor:#FEFEFE; - - --RS__backgroundColor:#000000; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{ + padding-top:var(--RS__scrollPaddingTop) !important; } -:root[style*="readium-night-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; - border-color:currentcolor !important; -} - -:root[style*="readium-night-on"] svg text{ - fill:currentcolor !important; - stroke:none !important; -} - -:root[style*="readium-night-on"] a:link, -:root[style*="readium-night-on"] a:link *{ - color:var(--RS__linkColor) !important; -} - -:root[style*="readium-night-on"] a:visited, -:root[style*="readium-night-on"] a:visited *{ - color:var(--RS__visitedColor) !important; -} - -:root[style*="readium-night-on"] img[class*="gaiji"], -:root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, -:root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:invert(100%); - filter:invert(100%); -} - -:root[style*="readium-sepia-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#faf4e8; -} - -:root[style*="readium-sepia-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{ + padding-bottom:var(--RS__scrollPaddingBottom) !important; } -:root[style*="readium-sepia-on"] a:link, -:root[style*="readium-sepia-on"] a:link *{ - color:var(--RS__linkColor); +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{ + padding-left:var(--RS__scrollPaddingLeft) !important; } -:root[style*="readium-sepia-on"] a:visited, -:root[style*="readium-sepia-on"] a:visited *{ - color:var(--RS__visitedColor); -} - -@media screen and (-ms-high-contrast: active){ - - :root{ - color:windowText !important; - background-color:window !important; - } - - :root :not(#\#):not(#\#):not(#\#), - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#){ - color:inherit !important; - background-color:inherit !important; - } - - .readiumCSS-mo-active-default{ - color:highlightText !important; - background-color:highlight !important; - } -} - -@media screen and (-ms-high-contrast: white-on-black){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (inverted-colors){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (monochrome){ -} - -@media screen and (prefers-reduced-motion){ +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{ + padding-right:var(--RS__scrollPaddingRight) !important; } :root[style*="--USER__backgroundColor"]{ @@ -318,18 +209,48 @@ body{ max-width:var(--USER__lineLength) !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"]{ +:root[style*="--USER__fontFamily"]{ font-family:var(--USER__fontFamily) !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"] *{ +:root[style*="--USER__fontFamily"] *{ font-family:revert !important; } -:root:not([style*="readium-deprecatedFontSize-on"])[style*="--USER__fontSize"] body{ +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] body{ zoom:var(--USER__fontSize) !important; } +:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{ + -webkit-text-size-adjust:var(--USER__fontSize) !important; +} + +@supports selector(figure:has(> img)){ + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{ + zoom:calc(100% / var(--USER__fontSize)) !important; + } + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{ + zoom:var(--USER__fontSize) !important; + } +} + @supports not (zoom: 1){ :root[style*="--USER__fontSize"]{ @@ -357,20 +278,20 @@ body{ margin-bottom:var(--USER__paraSpacing) !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] body{ +:root[style*="--USER__fontWeight"] body{ font-weight:var(--USER__fontWeight) !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] b, -:root[style*="readium-font-on"][style*="--USER__fontWeight"] strong{ +:root[style*="--USER__fontWeight"] b, +:root[style*="--USER__fontWeight"] strong{ font-weight:bolder; } -:root[style*="readium-font-on"][style*="--USER__fontWidth"] body{ +:root[style*="--USER__fontWidth"] body{ font-stretch:var(--USER__fontWidth) !important; } -:root[style*="readium-font-on"][style*="--USER__fontOpticalSizing"] body{ +:root[style*="--USER__fontOpticalSizing"] body{ font-optical-sizing:var(--USER__fontOpticalSizing) !important; } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-before.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-before.css index 9358959302..01fa1eb6bf 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-before.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-before.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -38,6 +45,31 @@ --RS__lineHeightCompensation:1; --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); + + --RS__selectionTextColor:inherit; + + --RS__selectionBackgroundColor:#b4d8fe; + + --RS__visitedColor:#551A8B; + + --RS__linkColor:#0000EE; + + --RS__textColor:#121212; + + --RS__backgroundColor:#FFFFFF; + color:var(--RS__textColor) !important; + + background-color:var(--RS__backgroundColor) !important; +} + +::-moz-selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); +} + +::selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); } html{ @@ -193,36 +225,6 @@ math{ --RS__lineHeightCompensation:1.167; } -:root{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#FFFFFF; -} - -:root{ - color:var(--RS__textColor) !important; - background-color:var(--RS__backgroundColor) !important; -} - -::-moz-selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - -::selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - body{ widows:2; orphans:2; diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-default.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-default.css index c1954250a3..31461a775c 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-default.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-horizontal/ReadiumCSS-default.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-after.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-after.css index 958fbca96d..de5e03fb3a 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-after.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-after.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -77,17 +84,20 @@ body{ max-height:var(--RS__defaultLineLength) !important; padding:var(--RS__pageGutter) 0 !important; margin:auto 0 !important; - overflow:hidden; box-sizing:border-box; } +:root:not([style*="readium-noOverflow-on"]) body{ + overflow:hidden; +} + @supports (overflow: clip){ - :root{ + :root:not([style*="readium-noOverflow-on"]){ overflow:clip; } - body{ + :root:not([style*="readium-noOverflow-on"]) body{ overflow:clip; overflow-clip-margin:content-box; } @@ -107,156 +117,34 @@ body{ :root[style*="readium-scroll-on"] body, :root[style*="readium-noVerticalPagination-on"] body{ max-width:var(--RS__defaultLineLength) !important; + box-sizing:border-box !important; } @supports (overflow: clip){ - :root[style*="readium-scroll-on"]{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]){ overflow:auto; } - :root[style*="readium-scroll-on"] body{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:clip; } } -:root[style*="readium-night-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#0099E5; - - --RS__linkColor:#63caff; - - --RS__textColor:#FEFEFE; - - --RS__backgroundColor:#000000; -} - -:root[style*="readium-night-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; - border-color:currentcolor !important; -} - -:root[style*="readium-night-on"] svg text{ - fill:currentcolor !important; - stroke:none !important; -} - -:root[style*="readium-night-on"] a:link, -:root[style*="readium-night-on"] a:link *{ - color:var(--RS__linkColor) !important; -} - -:root[style*="readium-night-on"] a:visited, -:root[style*="readium-night-on"] a:visited *{ - color:var(--RS__visitedColor) !important; -} - -:root[style*="readium-night-on"] img[class*="gaiji"], -:root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, -:root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:invert(100%); - filter:invert(100%); -} - -:root[style*="readium-sepia-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#faf4e8; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{ + padding-top:var(--RS__scrollPaddingTop) !important; } -:root[style*="readium-sepia-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{ + padding-bottom:var(--RS__scrollPaddingBottom) !important; } -:root[style*="readium-sepia-on"] a:link, -:root[style*="readium-sepia-on"] a:link *{ - color:var(--RS__linkColor); +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{ + padding-left:var(--RS__scrollPaddingLeft) !important; } -:root[style*="readium-sepia-on"] a:visited, -:root[style*="readium-sepia-on"] a:visited *{ - color:var(--RS__visitedColor); -} - -@media screen and (-ms-high-contrast: active){ - - :root{ - color:windowText !important; - background-color:window !important; - } - - :root :not(#\#):not(#\#):not(#\#), - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#){ - color:inherit !important; - background-color:inherit !important; - } - - .readiumCSS-mo-active-default{ - color:highlightText !important; - background-color:highlight !important; - } -} - -@media screen and (-ms-high-contrast: white-on-black){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (inverted-colors){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (monochrome){ -} - -@media screen and (prefers-reduced-motion){ +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{ + padding-right:var(--RS__scrollPaddingRight) !important; } :root[style*="--USER__backgroundColor"]{ @@ -306,18 +194,48 @@ body{ max-height:var(--USER__lineLength) !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"]{ +:root[style*="--USER__fontFamily"]{ font-family:var(--USER__fontFamily) !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"] *{ +:root[style*="--USER__fontFamily"] *{ font-family:revert !important; } -:root:not([style*="readium-deprecatedFontSize-on"])[style*="--USER__fontSize"] body{ +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] body{ zoom:var(--USER__fontSize) !important; } +:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{ + -webkit-text-size-adjust:var(--USER__fontSize) !important; +} + +@supports selector(figure:has(> img)){ + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{ + zoom:calc(100% / var(--USER__fontSize)) !important; + } + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{ + zoom:var(--USER__fontSize) !important; + } +} + @supports not (zoom: 1){ :root[style*="--USER__fontSize"]{ @@ -345,20 +263,20 @@ body{ margin-left:var(--USER__paraSpacing) !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] body{ +:root[style*="--USER__fontWeight"] body{ font-weight:var(--USER__fontWeight) !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] b, -:root[style*="readium-font-on"][style*="--USER__fontWeight"] strong{ +:root[style*="--USER__fontWeight"] b, +:root[style*="--USER__fontWeight"] strong{ font-weight:bolder; } -:root[style*="readium-font-on"][style*="--USER__fontWidth"] body{ +:root[style*="--USER__fontWidth"] body{ font-stretch:var(--USER__fontWidth) !important; } -:root[style*="readium-font-on"][style*="--USER__fontOpticalSizing"] body{ +:root[style*="--USER__fontOpticalSizing"] body{ font-optical-sizing:var(--USER__fontOpticalSizing) !important; } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-before.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-before.css index 0072752b1a..4e30c47187 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-before.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-before.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -38,6 +45,31 @@ --RS__lineHeightCompensation:1; --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); + + --RS__selectionTextColor:inherit; + + --RS__selectionBackgroundColor:#b4d8fe; + + --RS__visitedColor:#551A8B; + + --RS__linkColor:#0000EE; + + --RS__textColor:#121212; + + --RS__backgroundColor:#FFFFFF; + color:var(--RS__textColor) !important; + + background-color:var(--RS__backgroundColor) !important; +} + +::-moz-selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); +} + +::selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); } html{ @@ -193,36 +225,6 @@ math{ --RS__lineHeightCompensation:1.167; } -:root{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#FFFFFF; -} - -:root{ - color:var(--RS__textColor) !important; - background-color:var(--RS__backgroundColor) !important; -} - -::-moz-selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - -::selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - body{ widows:2; orphans:2; diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-default.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-default.css index 08e7b95fd6..52b3ac7733 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-default.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/cjk-vertical/ReadiumCSS-default.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-after.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-after.css index 2d9b79405c..befc238400 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-after.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-after.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -66,17 +73,20 @@ body{ max-width:var(--RS__defaultLineLength) !important; padding:0 var(--RS__pageGutter) !important; margin:0 auto !important; - overflow:hidden; box-sizing:border-box; } +:root:not([style*="readium-noOverflow-on"]) body{ + overflow:hidden; +} + @supports (overflow: clip){ - :root{ + :root:not([style*="readium-noOverflow-on"]){ overflow:clip; } - body{ + :root:not([style*="readium-noOverflow-on"]) body{ overflow:clip; overflow-clip-margin:content-box; } @@ -96,157 +106,38 @@ body{ :root[style*="readium-scroll-on"] body{ max-width:var(--RS__defaultLineLength) !important; + box-sizing:border-box !important; +} + +:root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:auto; } @supports (overflow: clip){ - :root[style*="readium-scroll-on"]{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]){ overflow:auto; } - :root[style*="readium-scroll-on"] body{ + :root[style*="readium-scroll-on"]:not([style*="readium-noOverflow-on"]) body{ overflow:clip; } } -:root[style*="readium-night-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#0099E5; - - --RS__linkColor:#63caff; - - --RS__textColor:#FEFEFE; - - --RS__backgroundColor:#000000; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingTop"] body{ + padding-top:var(--RS__scrollPaddingTop) !important; } -:root[style*="readium-night-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; - border-color:currentcolor !important; -} - -:root[style*="readium-night-on"] svg text{ - fill:currentcolor !important; - stroke:none !important; -} - -:root[style*="readium-night-on"] a:link, -:root[style*="readium-night-on"] a:link *{ - color:var(--RS__linkColor) !important; -} - -:root[style*="readium-night-on"] a:visited, -:root[style*="readium-night-on"] a:visited *{ - color:var(--RS__visitedColor) !important; -} - -:root[style*="readium-night-on"] img[class*="gaiji"], -:root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, -:root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:invert(100%); - filter:invert(100%); -} - -:root[style*="readium-sepia-on"]{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#faf4e8; -} - -:root[style*="readium-sepia-on"] *:not(a){ - color:inherit !important; - background-color:transparent !important; +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingBottom"] body{ + padding-bottom:var(--RS__scrollPaddingBottom) !important; } -:root[style*="readium-sepia-on"] a:link, -:root[style*="readium-sepia-on"] a:link *{ - color:var(--RS__linkColor); +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingLeft"] body{ + padding-left:var(--RS__scrollPaddingLeft) !important; } -:root[style*="readium-sepia-on"] a:visited, -:root[style*="readium-sepia-on"] a:visited *{ - color:var(--RS__visitedColor); -} - -@media screen and (-ms-high-contrast: active){ - - :root{ - color:windowText !important; - background-color:window !important; - } - - :root :not(#\#):not(#\#):not(#\#), - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) - :root :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#) :not(#\#):not(#\#):not(#\#){ - color:inherit !important; - background-color:inherit !important; - } - - .readiumCSS-mo-active-default{ - color:highlightText !important; - background-color:highlight !important; - } -} - -@media screen and (-ms-high-contrast: white-on-black){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (inverted-colors){ - - :root[style*="readium-night-on"] img[class*="gaiji"], - :root[style*="readium-night-on"] *[epub\:type~="titlepage"] img:only-child, - :root[style*="readium-night-on"] *[epub|type~="titlepage"] img:only-child{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-invert-on"] img{ - -webkit-filter:none !important; - filter:none !important; - } - - :root[style*="readium-night-on"][style*="readium-darken-on"][style*="readium-invert-on"] img{ - -webkit-filter:brightness(80%); - filter:brightness(80%); - } -} - -@media screen and (monochrome){ -} - -@media screen and (prefers-reduced-motion){ +:root[style*="readium-scroll-on"][style*="--RS__scrollPaddingRight"] body{ + padding-right:var(--RS__scrollPaddingRight) !important; } :root[style*="--USER__backgroundColor"]{ @@ -323,7 +214,15 @@ body{ } :root[style*="--USER__textAlign"] body, -:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(hgroup p), +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +), :root[style*="--USER__textAlign"] li, :root[style*="--USER__textAlign"] dd{ text-align:var(--USER__textAlign) !important; @@ -332,18 +231,48 @@ body{ text-align-last:auto !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"]{ +:root[style*="--USER__fontFamily"]{ font-family:var(--USER__fontFamily) !important; } -:root[style*="readium-font-on"][style*="--USER__fontFamily"] *{ +:root[style*="--USER__fontFamily"] *{ font-family:revert !important; } -:root:not([style*="readium-deprecatedFontSize-on"])[style*="--USER__fontSize"] body{ +:root:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] body{ zoom:var(--USER__fontSize) !important; } +:root:not([style*="readium-deprecatedFontSize-on"])[style*="readium-iOSPatch-on"][style*="--USER__fontSize"] body{ + -webkit-text-size-adjust:var(--USER__fontSize) !important; +} + +@supports selector(figure:has(> img)){ + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> img), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> video), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> svg), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> canvas), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> iframe), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figure:has(> audio), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> img:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> video:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> svg:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> canvas:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> iframe:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] div:has(> audio:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] table{ + zoom:calc(100% / var(--USER__fontSize)) !important; + } + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] figcaption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] caption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] td, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-deprecatedFontSize-on"]):not([style*="readium-iOSPatch-on"])[style*="--USER__fontSize"] th{ + zoom:var(--USER__fontSize) !important; + } +} + @supports not (zoom: 1){ :root[style*="--USER__fontSize"]{ @@ -371,7 +300,15 @@ body{ margin-bottom:var(--USER__paraSpacing) !important; } -:root[style*="--USER__paraIndent"] p{ +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +){ text-indent:var(--USER__paraIndent) !important; } @@ -402,20 +339,20 @@ body{ font-variant-ligatures:inherit !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] body{ +:root[style*="--USER__fontWeight"] body{ font-weight:var(--USER__fontWeight) !important; } -:root[style*="readium-font-on"][style*="--USER__fontWeight"] b, -:root[style*="readium-font-on"][style*="--USER__fontWeight"] strong{ +:root[style*="--USER__fontWeight"] b, +:root[style*="--USER__fontWeight"] strong{ font-weight:bolder; } -:root[style*="readium-font-on"][style*="--USER__fontWidth"] body{ +:root[style*="--USER__fontWidth"] body{ font-stretch:var(--USER__fontWidth) !important; } -:root[style*="readium-font-on"][style*="--USER__fontOpticalSizing"] body{ +:root[style*="--USER__fontOpticalSizing"] body{ font-optical-sizing:var(--USER__fontOpticalSizing) !important; } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-before.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-before.css index 9358959302..01fa1eb6bf 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-before.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-before.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); @@ -38,6 +45,31 @@ --RS__lineHeightCompensation:1; --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); + + --RS__selectionTextColor:inherit; + + --RS__selectionBackgroundColor:#b4d8fe; + + --RS__visitedColor:#551A8B; + + --RS__linkColor:#0000EE; + + --RS__textColor:#121212; + + --RS__backgroundColor:#FFFFFF; + color:var(--RS__textColor) !important; + + background-color:var(--RS__backgroundColor) !important; +} + +::-moz-selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); +} + +::selection{ + color:var(--RS__selectionTextColor); + background-color:var(--RS__selectionBackgroundColor); } html{ @@ -193,36 +225,6 @@ math{ --RS__lineHeightCompensation:1.167; } -:root{ - - --RS__selectionTextColor:inherit; - - --RS__selectionBackgroundColor:#b4d8fe; - - --RS__visitedColor:#551A8B; - - --RS__linkColor:#0000EE; - - --RS__textColor:#121212; - - --RS__backgroundColor:#FFFFFF; -} - -:root{ - color:var(--RS__textColor) !important; - background-color:var(--RS__backgroundColor) !important; -} - -::-moz-selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - -::selection{ - color:var(--RS__selectionTextColor); - background-color:var(--RS__selectionBackgroundColor); -} - body{ widows:2; orphans:2; diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-default.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-default.css index c54777b89b..8c43482da2 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-default.css +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/rtl/ReadiumCSS-default.css @@ -1,10 +1,17 @@ -/* - * Readium CSS (v. 2.0.0-beta.13) - * Developers: Jiminy Panoz - * Copyright (c) 2017. Readium Foundation. All rights reserved. +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. -*/ + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ @namespace url("http://www.w3.org/1999/xhtml"); diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/webPub/ReadiumCSS-webPub.css b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/webPub/ReadiumCSS-webPub.css new file mode 100644 index 0000000000..a39093baf7 --- /dev/null +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/readium-css/webPub/ReadiumCSS-webPub.css @@ -0,0 +1,290 @@ +/*! + * Readium CSS v.2.0.0-beta.24 + * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. + * Use of this source code is governed by a BSD-style license which is detailed in the + * LICENSE file present in the project repository where this source code is maintained. + * Core maintainer: Jiminy Panoz + * Contributors: + * Daniel Weck + * Hadrien Gardeur + * Innovimax + * L. Le Meur + * Mickaël Menu + * k_taka + */ + +:root[style*="--USER__textAlign"]{ + text-align:var(--USER__textAlign); +} + +:root[style*="--USER__textAlign"] body, +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +), +:root[style*="--USER__textAlign"] li, +:root[style*="--USER__textAlign"] dd{ + text-align:var(--USER__textAlign) !important; + -moz-text-align-last:auto !important; + -epub-text-align-last:auto !important; + text-align-last:auto !important; +} + +:root[style*="--USER__bodyHyphens"]{ + -webkit-hyphens:var(--USER__bodyHyphens) !important; + -moz-hyphens:var(--USER__bodyHyphens) !important; + -ms-hyphens:var(--USER__bodyHyphens) !important; + -epub-hyphens:var(--USER__bodyHyphens) !important; + hyphens:var(--USER__bodyHyphens) !important; +} + +:root[style*="--USER__bodyHyphens"] body, +:root[style*="--USER__bodyHyphens"] p, +:root[style*="--USER__bodyHyphens"] li, +:root[style*="--USER__bodyHyphens"] div, +:root[style*="--USER__bodyHyphens"] dd{ + -webkit-hyphens:inherit; + -moz-hyphens:inherit; + -ms-hyphens:inherit; + -epub-hyphens:inherit; + hyphens:inherit; +} + +:root[style*="--USER__fontFamily"]{ + font-family:var(--USER__fontFamily) !important; +} + +:root[style*="--USER__fontFamily"] *{ + font-family:revert !important; +} + +:root[style*="AccessibleDfA"]{ + font-family:AccessibleDfA, Verdana, Tahoma, "Trebuchet MS", sans-serif !important; +} + +:root[style*="IA Writer Duospace"]{ + font-family:"IA Writer Duospace", Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Courier, monospace !important; +} + +:root[style*="AccessibleDfA"],:root[style*="IA Writer Duospace"], +:root[style*="readium-a11y-on"]{ + font-style:normal !important; + font-weight:normal !important; +} + +:root[style*="AccessibleDfA"] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp), +:root[style*="readium-a11y-on"] body *:not(code):not(var):not(kbd):not(samp){ + font-family:inherit !important; + font-style:inherit !important; + font-weight:inherit !important; +} + +:root[style*="AccessibleDfA"] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a), +:root[style*="readium-a11y-on"] body *:not(a){ + text-decoration:none !important; +} + +:root[style*="AccessibleDfA"] body *,:root[style*="IA Writer Duospace"] body *, +:root[style*="readium-a11y-on"] body *{ + font-variant-caps:normal !important; + font-variant-numeric:normal !important; + font-variant-position:normal !important; +} + +:root[style*="AccessibleDfA"] sup,:root[style*="IA Writer Duospace"] sup, +:root[style*="readium-a11y-on"] sup, +:root[style*="AccessibleDfA"] sub, +:root[style*="IA Writer Duospace"] sub, +:root[style*="readium-a11y-on"] sub{ + font-size:1rem !important; + vertical-align:baseline !important; +} + +:root:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] body{ + zoom:var(--USER__zoom) !important; +} + +:root[style*="readium-iOSPatch-on"][style*="--USER__zoom"] body{ + -webkit-text-size-adjust:var(--USER__zoom) !important; +} + +@supports selector(figure:has(> img)){ + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> img), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> video), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> svg), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> canvas), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> iframe), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figure:has(> audio), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> img:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> video:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> svg:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> canvas:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> iframe:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] div:has(> audio:only-child), + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] table{ + zoom:calc(100% / var(--USER__zoom)) !important; + } + + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] figcaption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] caption, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] td, + :root[style*="readium-experimentalZoom-on"]:not([style*="readium-iOSPatch-on"])[style*="--USER__zoom"] th{ + zoom:var(--USER__zoom) !important; + } +} + +:root[style*="--USER__lineHeight"]{ + line-height:var(--USER__lineHeight) !important; +} + +:root[style*="--USER__lineHeight"] body, +:root[style*="--USER__lineHeight"] p, +:root[style*="--USER__lineHeight"] li, +:root[style*="--USER__lineHeight"] div{ + line-height:inherit; +} + +:root[style*="--USER__paraSpacing"] p{ + margin-top:var(--USER__paraSpacing) !important; + margin-bottom:var(--USER__paraSpacing) !important; +} + +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +){ + text-indent:var(--USER__paraIndent) !important; +} + +:root[style*="--USER__paraIndent"] p *, +:root[style*="--USER__paraIndent"] p:first-letter{ + text-indent:0 !important; +} + +:root[style*="--USER__wordSpacing"] h1, +:root[style*="--USER__wordSpacing"] h2, +:root[style*="--USER__wordSpacing"] h3, +:root[style*="--USER__wordSpacing"] h4, +:root[style*="--USER__wordSpacing"] h5, +:root[style*="--USER__wordSpacing"] h6, +:root[style*="--USER__wordSpacing"] p, +:root[style*="--USER__wordSpacing"] li, +:root[style*="--USER__wordSpacing"] div, +:root[style*="--USER__wordSpacing"] dt, +:root[style*="--USER__wordSpacing"] dd{ + word-spacing:var(--USER__wordSpacing); +} + +:root[style*="--USER__letterSpacing"] h1, +:root[style*="--USER__letterSpacing"] h2, +:root[style*="--USER__letterSpacing"] h3, +:root[style*="--USER__letterSpacing"] h4, +:root[style*="--USER__letterSpacing"] h5, +:root[style*="--USER__letterSpacing"] h6, +:root[style*="--USER__letterSpacing"] p, +:root[style*="--USER__letterSpacing"] li, +:root[style*="--USER__letterSpacing"] div, +:root[style*="--USER__letterSpacing"] dt, +:root[style*="--USER__letterSpacing"] dd{ + letter-spacing:var(--USER__letterSpacing); + font-variant:none; +} + +:root[style*="--USER__fontWeight"] body{ + font-weight:var(--USER__fontWeight) !important; +} + +:root[style*="--USER__fontWeight"] b, +:root[style*="--USER__fontWeight"] strong{ + font-weight:bolder; +} + +:root[style*="--USER__fontWidth"] body{ + font-stretch:var(--USER__fontWidth) !important; +} + +:root[style*="--USER__fontOpticalSizing"] body{ + font-optical-sizing:var(--USER__fontOpticalSizing) !important; +} + +:root[style*="readium-noRuby-on"] body rt, +:root[style*="readium-noRuby-on"] body rp{ + display:none; +} + +:root[style*="--USER__ligatures"]{ + font-variant-ligatures:var(--USER__ligatures) !important; +} + +:root[style*="--USER__ligatures"] *{ + font-variant-ligatures:inherit !important; +} + +:root[style*="readium-iPadOSPatch-on"] body{ + -webkit-text-size-adjust:none; +} + +:root[style*="readium-iPadOSPatch-on"] p, +:root[style*="readium-iPadOSPatch-on"] h1, +:root[style*="readium-iPadOSPatch-on"] h2, +:root[style*="readium-iPadOSPatch-on"] h3, +:root[style*="readium-iPadOSPatch-on"] h4, +:root[style*="readium-iPadOSPatch-on"] h5, +:root[style*="readium-iPadOSPatch-on"] h6, +:root[style*="readium-iPadOSPatch-on"] li, +:root[style*="readium-iPadOSPatch-on"] th, +:root[style*="readium-iPadOSPatch-on"] td, +:root[style*="readium-iPadOSPatch-on"] dt, +:root[style*="readium-iPadOSPatch-on"] dd, +:root[style*="readium-iPadOSPatch-on"] pre, +:root[style*="readium-iPadOSPatch-on"] address, +:root[style*="readium-iPadOSPatch-on"] details, +:root[style*="readium-iPadOSPatch-on"] summary, +:root[style*="readium-iPadOSPatch-on"] figcaption, +:root[style*="readium-iPadOSPatch-on"] div:not(:has(p, h1, h2, h3, h4, h5, h6, li, th, td, dt, dd, pre, address, aside, details, figcaption, summary)), +:root[style*="readium-iPadOSPatch-on"] aside:not(:has(p, h1, h2, h3, h4, h5, h6, li, th, td, dt, dd, pre, address, aside, details, figcaption, summary)){ + -webkit-text-zoom:reset; +} + +:root[style*="readium-iPadOSPatch-on"] abbr, +:root[style*="readium-iPadOSPatch-on"] b, +:root[style*="readium-iPadOSPatch-on"] bdi, +:root[style*="readium-iPadOSPatch-on"] bdo, +:root[style*="readium-iPadOSPatch-on"] cite, +:root[style*="readium-iPadOSPatch-on"] code, +:root[style*="readium-iPadOSPatch-on"] dfn, +:root[style*="readium-iPadOSPatch-on"] em, +:root[style*="readium-iPadOSPatch-on"] i, +:root[style*="readium-iPadOSPatch-on"] kbd, +:root[style*="readium-iPadOSPatch-on"] mark, +:root[style*="readium-iPadOSPatch-on"] q, +:root[style*="readium-iPadOSPatch-on"] rp, +:root[style*="readium-iPadOSPatch-on"] rt, +:root[style*="readium-iPadOSPatch-on"] ruby, +:root[style*="readium-iPadOSPatch-on"] s, +:root[style*="readium-iPadOSPatch-on"] samp, +:root[style*="readium-iPadOSPatch-on"] small, +:root[style*="readium-iPadOSPatch-on"] span, +:root[style*="readium-iPadOSPatch-on"] strong, +:root[style*="readium-iPadOSPatch-on"] sub, +:root[style*="readium-iPadOSPatch-on"] sup, +:root[style*="readium-iPadOSPatch-on"] time, +:root[style*="readium-iPadOSPatch-on"] u, +:root[style*="readium-iPadOSPatch-on"] var{ + -webkit-text-zoom:normal; +} + +:root[style*="readium-iPadOSPatch-on"] p:not(:has(b, cite, em, i, q, s, small, span, strong)):first-line{ + -webkit-text-zoom:normal; +} \ No newline at end of file diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt index 9be5c05be5..490349f00d 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt @@ -351,7 +351,6 @@ internal fun ReadiumCssInjector.withSettings(settings: ReflowableWebSettings): R backgroundColor = backgroundColor.toCss().takeIf { overridePublisherColors }, linkColor = linkColor.toCss().takeIf { overridePublisherColors }, visitedLinkColor = visitedColor.toCss().takeIf { overridePublisherColors }, - fontOverride = true, // we don't need this guard, fontFamily = fontFamily?.toCss(), fontSize = Length.Percent(fontSize), fontWeight = fontWeight?.let { (FontWeight.NORMAL.value * it).toInt().coerceIn(1, 1000) }, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt index c269117279..96bac0cab7 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt @@ -50,7 +50,6 @@ internal interface ReadiumCssProperties : Cssable { * variable. * @param linkColor The color for links. * @param visitedLinkColor The color for visited links. - * @param fontOverride This flag is required to change the font-family user setting. * @param fontFamily The typeface (font-family) the user wants to read with. It impacts body, p, * li, div, dt, dd and phrasing elements which don’t have a lang or xml:lang attribute. To reset, * remove the required flag. Requires: fontOverride @@ -171,6 +170,10 @@ internal data class UserProperties( * @param colGap The gap between columns. You must account for this gap when scrolling. * @param pageGutter The horizontal page margins. * @param disableVerticalPagination If pagination should be disabled with vertical text. + * @param scrollPaddingTop Padding amount to insert at the top of resources in scroll mode. + * @param scrollPaddingBottom Padding amount to insert at the bottom of resources in scroll mode. + * @param scrollPaddingLeft Padding amount to insert at the left of resources in scroll mode. + * @param scrollPaddingRight Padding amount to insert at the right of resources in scroll mode. * @param flowSpacing The default vertical margins for HTML5 flow content e.g. pre, figure, * blockquote, etc. * @param paraSpacing The default vertical margins for paragraphs. @@ -221,6 +224,12 @@ internal data class RsProperties( val pageGutter: Length.Px? = null, val disableVerticalPagination: Boolean? = null, + // Scroll padding + val scrollPaddingTop: Length? = null, + val scrollPaddingBottom: Length? = null, + val scrollPaddingLeft: Length? = null, + val scrollPaddingRight: Length? = null, + // Vertical rhythm val flowSpacing: Length? = null, val paraSpacing: Length? = null, @@ -275,6 +284,12 @@ internal data class RsProperties( putCss("--RS__pageGutter", pageGutter) putCss("--RS__disablePagination", flag("noVerticalPagination", disableVerticalPagination)) + // Scroll padding + putCss("--RS__scrollPaddingTop", scrollPaddingTop) + putCss("--RS__scrollPaddingBottom", scrollPaddingBottom) + putCss("--RS__scrollPaddingLeft", scrollPaddingLeft) + putCss("--RS__scrollPaddingRight", scrollPaddingRight) + // Vertical rhythm putCss("--RS__flowSpacing", flowSpacing) putCss("--RS__paraSpacing", paraSpacing) From 16ca5966200402e77674b506cc83f22ee15a7802 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 16 Jan 2026 16:52:56 +0100 Subject: [PATCH 33/56] Revisit margins and insets --- .../navigator/web/internals/util/Padding.kt | 37 ++++++++++ .../web/reflowable/ReflowableWebRendition.kt | 67 +++++-------------- .../reflowable/ReflowableWebRenditionState.kt | 19 +++--- .../web/reflowable/css/ReadiumCssInjector.kt | 41 +++++++++--- .../reflowable/css/ReadiumCssProperties.kt | 4 +- .../web/reflowable/layout/LayoutConstants.kt | 13 ++++ .../{css => layout}/LayoutResolver.kt | 37 ++++------ 7 files changed, 127 insertions(+), 91 deletions(-) create mode 100644 readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt rename readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/{css => layout}/LayoutResolver.kt (85%) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt index c0cc329d0b..7d5583c0df 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/util/Padding.kt @@ -12,8 +12,11 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalLayoutDirection +import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp +import kotlin.math.max public data class AbsolutePaddingValues( val top: Dp = 0.dp, @@ -50,3 +53,37 @@ public fun WindowInsets.asAbsolutePaddingValues(): AbsolutePaddingValues { val left = with(density) { getLeft(density, layoutDirection).toDp() } return AbsolutePaddingValues(top = top, right = right, bottom = bottom, left = left) } + +public fun WindowInsets.symmetric(): WindowInsets = + SymmetricWindowsInsets(this) + +private class SymmetricWindowsInsets( + private val baseWindowsInsets: WindowInsets, +) : WindowInsets { + + override fun getLeft( + density: Density, + layoutDirection: LayoutDirection, + ): Int { + val left = baseWindowsInsets.getLeft(density, layoutDirection) + val right = baseWindowsInsets.getRight(density, layoutDirection) + return max(left, right) + } + + override fun getTop(density: Density): Int { + val top = baseWindowsInsets.getTop(density) + val bottom = baseWindowsInsets.getBottom(density) + return max(top, bottom) + } + + override fun getRight( + density: Density, + layoutDirection: LayoutDirection, + ): Int { + return getLeft(density, layoutDirection) + } + + override fun getBottom(density: Density): Int { + return getTop(density) + } +} diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index 6295b13666..cf79ef9824 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -4,6 +4,8 @@ * available in the top-level LICENSE file of the project. */ +@file:OptIn(ExperimentalReadiumApi::class) + package org.readium.navigator.web.reflowable import android.annotation.SuppressLint @@ -11,31 +13,24 @@ import android.content.res.Configuration import android.view.ActionMode import androidx.compose.foundation.background import androidx.compose.foundation.gestures.ScrollableDefaults -import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.WindowInsetsSides -import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.displayCutout import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.only -import androidx.compose.foundation.layout.windowInsetsPadding +import androidx.compose.foundation.layout.union import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier -import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.Color -import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalLayoutDirection -import androidx.compose.ui.unit.Density -import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp import kotlinx.collections.immutable.toImmutableMap import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -44,7 +39,6 @@ import org.readium.navigator.common.DecorationListener import org.readium.navigator.common.HyperlinkListener import org.readium.navigator.common.InputListener import org.readium.navigator.common.TapContext -import org.readium.navigator.common.TapEvent import org.readium.navigator.common.defaultDecorationListener import org.readium.navigator.common.defaultHyperlinkListener import org.readium.navigator.common.defaultInputListener @@ -56,10 +50,11 @@ import org.readium.navigator.web.internals.util.AbsolutePaddingValues import org.readium.navigator.web.internals.util.HyperlinkProcessor import org.readium.navigator.web.internals.util.asAbsolutePaddingValues import org.readium.navigator.web.internals.util.rememberUpdatedRef +import org.readium.navigator.web.internals.util.symmetric import org.readium.navigator.web.internals.util.toLayoutDirection +import org.readium.navigator.web.reflowable.layout.LayoutConstants import org.readium.navigator.web.reflowable.resource.ReflowablePagingLayoutInfo import org.readium.navigator.web.reflowable.resource.ReflowableResource -import org.readium.r2.navigator.preferences.Axis import org.readium.r2.shared.ExperimentalReadiumApi import org.readium.r2.shared.util.AbsoluteUrl import org.readium.r2.shared.util.RelativeUrl @@ -100,27 +95,22 @@ public fun ReflowableWebRendition( val coroutineScope = rememberCoroutineScope() - val resourcePadding = when (state.layoutDelegate.overflow.value.axis) { - Axis.HORIZONTAL -> - when (LocalConfiguration.current.orientation) { - Configuration.ORIENTATION_LANDSCAPE -> - AbsolutePaddingValues(vertical = 20.dp) - else -> - AbsolutePaddingValues(vertical = 40.dp) + val resourcePadding = when (state.layoutDelegate.overflow.value.scroll) { + true -> + AbsolutePaddingValues() + false -> { + val margins = when (LocalConfiguration.current.orientation) { + Configuration.ORIENTATION_LANDSCAPE -> LayoutConstants.pageVerticalMarginsLandscape + else -> LayoutConstants.pageVerticalMarginsPortrait } - Axis.VERTICAL -> { - val paddingInsets = windowInsets.only(WindowInsetsSides.Vertical) - val bottom = paddingInsets.asPaddingValues().calculateBottomPadding() - val top = paddingInsets.asPaddingValues().calculateTopPadding() - AbsolutePaddingValues(top = top, bottom = bottom) + windowInsets + .only(WindowInsetsSides.Vertical) + .union(WindowInsets(top = margins, bottom = margins)) + .symmetric() + .asAbsolutePaddingValues() } } - val pagerPaddingInsets = when (state.layoutDelegate.overflow.value.axis) { - Axis.HORIZONTAL -> windowInsets.only(WindowInsetsSides.Vertical) - Axis.VERTICAL -> windowInsets.only(WindowInsetsSides.Horizontal) - } - val flingBehavior = if (state.layoutDelegate.overflow.value.scroll) { ScrollableDefaults.flingBehavior() } else { @@ -149,14 +139,7 @@ public fun ReflowableWebRendition( RenditionPager( modifier = Modifier // Apply background on padding - .background(backgroundColor) - // Detect taps on padding - .pointerInput(Unit) { - detectTapGestures( - onTap = { onTapOnPadding(it, viewportSize.value, inputListener) } - ) - } - .windowInsetsPadding(pagerPaddingInsets), + .background(backgroundColor), state = state.pagerState, scrollState = state.scrollState, flingBehavior = flingBehavior, @@ -212,20 +195,6 @@ public fun ReflowableWebRendition( } } -@OptIn(ExperimentalReadiumApi::class) -private fun (Density).onTapOnPadding( - offset: Offset, - viewportSize: DpSize, - listener: InputListener, -) { - if (offset.x >= 0 && offset.y >= 0) { - val offset = DpOffset(x = offset.x.toDp(), y = offset.y.toDp()) - val event = TapEvent(offset) - listener.onTap(event, TapContext(viewportSize)) - } -} - -@OptIn(ExperimentalReadiumApi::class) private suspend fun HyperlinkProcessor.onLinkActivated( url: Url, outerHtml: String, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 7845600333..0d19d4f65c 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -21,7 +21,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp import kotlin.coroutines.suspendCoroutine import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap @@ -53,13 +52,14 @@ import org.readium.navigator.web.internals.util.toLayoutDirection import org.readium.navigator.web.internals.util.toOrientation import org.readium.navigator.web.internals.webapi.ReflowableSelectionApi import org.readium.navigator.web.internals.webview.WebViewScrollController -import org.readium.navigator.web.reflowable.css.LayoutResolver import org.readium.navigator.web.reflowable.css.ReadiumCssInjector import org.readium.navigator.web.reflowable.css.RsProperties import org.readium.navigator.web.reflowable.css.UserProperties import org.readium.navigator.web.reflowable.css.withLayout import org.readium.navigator.web.reflowable.css.withSettings import org.readium.navigator.web.reflowable.injection.injectHtmlReflowable +import org.readium.navigator.web.reflowable.layout.LayoutConstants +import org.readium.navigator.web.reflowable.layout.LayoutResolver import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings import org.readium.navigator.web.reflowable.resource.ReflowableResourceLocation import org.readium.navigator.web.reflowable.resource.ReflowableResourceState @@ -311,10 +311,10 @@ internal class ReflowableLayoutDelegate( private val layoutResolver = LayoutResolver( - baseMinMargins = 15.dp, - baseMinLineLength = 400.dp, - baseOptimalLineLength = 600.dp, - baseMaxLineLength = 800.dp + baseMinMargins = LayoutConstants.baseMinMargins, + baseMinLineLength = LayoutConstants.baseMinLineLength, + baseOptimalLineLength = LayoutConstants.baseOptimalLineLength, + baseMaxLineLength = LayoutConstants.baseMaxLineLength ) internal var viewportSize: DpSize? by mutableStateOf(null) @@ -350,7 +350,10 @@ internal class ReflowableLayoutDelegate( injector } else { injector.withLayout( - layoutResolver.layout( + fontSize = settings.fontSize, + verticalText = settings.verticalText, + safeDrawing = safeDrawing!!, + layout = layoutResolver.layout( settings = settings, systemFontScale = fontScale!!, viewportSize = viewportSize!!, @@ -527,7 +530,7 @@ private fun ReflowableWebGoLocation.toResourceLocations( ?: htmlId?.let { ReflowableResourceLocation.HtmlId(it) } ?: ReflowableResourceLocation.Progression(progression ?: Progression(0.0)!!) - return readingOrder.items.mapIndexed { index, state -> + return readingOrder.items.mapIndexed { index, _ -> when { index < destIndex -> ReflowableResourceLocation.Progression(Progression(1.0)!!) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt index 490349f00d..595b2e3f79 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssInjector.kt @@ -15,8 +15,10 @@ import org.jsoup.nodes.Element import org.readium.navigator.web.common.FontFaceDeclaration import org.readium.navigator.web.common.FontFamilyDeclaration import org.readium.navigator.web.common.FontWeight +import org.readium.navigator.web.internals.util.AbsolutePaddingValues import org.readium.navigator.web.reflowable.css.Color as CssColor import org.readium.navigator.web.reflowable.css.TextAlign as CssTextAlign +import org.readium.navigator.web.reflowable.layout.Layout import org.readium.navigator.web.reflowable.preferences.ReflowableWebSettings import org.readium.r2.navigator.preferences.Color import org.readium.r2.navigator.preferences.FontFamily @@ -342,7 +344,7 @@ internal fun ReadiumCssInjector.withSettings(settings: ReflowableWebSettings): R ), userProperties = userProperties.copy( view = when (scroll) { - false -> View.PAGED + false -> if (verticalText) View.SCROLL else View.PAGED true -> View.SCROLL }, darkenImages = imageFilter == ImageFilter.DARKEN, @@ -384,11 +386,34 @@ internal fun ReadiumCssInjector.withSettings(settings: ReflowableWebSettings): R } } +// CSS zoom multiplies the px line value by +// the zoom factor so we need to do the reverse thing. +// If we don't, line length decreases with fontSize. internal fun ReadiumCssInjector.withLayout( - viewportLayout: Layout, -): ReadiumCssInjector = copy( - userProperties = userProperties.copy( - colCount = viewportLayout.colCount, - lineLength = Length.Px(viewportLayout.lineLength.value.toDouble()) - ) -) + fontSize: Double, + verticalText: Boolean, + safeDrawing: AbsolutePaddingValues, + layout: Layout, +): ReadiumCssInjector = + copy( + userProperties = userProperties.copy( + colCount = layout.colCount, + lineLength = Length.Px(layout.lineLength.value.toDouble() / fontSize) + ) + ).run { + if (verticalText) { + copy( + rsProperties = rsProperties.copy( + scrollPaddingLeft = Length.Px(safeDrawing.left.value.toDouble() / fontSize), + scrollPaddingRight = Length.Px(safeDrawing.right.value.toDouble() / fontSize) + ) + ) + } else { + copy( + rsProperties = rsProperties.copy( + scrollPaddingTop = Length.Px(safeDrawing.top.value.toDouble() / fontSize), + scrollPaddingBottom = Length.Px(safeDrawing.bottom.value.toDouble() / fontSize), + ) + ) + } + } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt index 96bac0cab7..f4a3bf37d9 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/ReadiumCssProperties.kt @@ -277,11 +277,13 @@ internal data class RsProperties( ) : ReadiumCssProperties { override fun toCssProperties(): Map = buildMap { + check(pageGutter == null) + // Pagination putCss("--RS__colWidth", colWidth) putCss("--RS__colCount", colCount) putCss("--RS__colGap", colGap) - putCss("--RS__pageGutter", pageGutter) + // putCss("--RS__pageGutter", pageGutter) // pageGutter conflicts with scrollPaddingX properties putCss("--RS__disablePagination", flag("noVerticalPagination", disableVerticalPagination)) // Scroll padding diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt new file mode 100644 index 0000000000..dfd3fbcff7 --- /dev/null +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt @@ -0,0 +1,13 @@ +package org.readium.navigator.web.reflowable.layout + +import androidx.compose.ui.unit.dp + +internal object LayoutConstants { + + val pageVerticalMarginsLandscape = 20.dp + val pageVerticalMarginsPortrait = 70.dp + val baseMinMargins = 30.dp + val baseMinLineLength = 440.dp + val baseOptimalLineLength = 640.dp + val baseMaxLineLength = 740.dp +} diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/LayoutResolver.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutResolver.kt similarity index 85% rename from readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/LayoutResolver.kt rename to readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutResolver.kt index feecc98bfe..429a4057b4 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/css/LayoutResolver.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutResolver.kt @@ -6,13 +6,12 @@ @file:OptIn(ExperimentalReadiumApi::class) -package org.readium.navigator.web.reflowable.css +package org.readium.navigator.web.reflowable.layout import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.coerceAtLeast import androidx.compose.ui.unit.coerceAtMost -import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.max import kotlin.math.floor import kotlin.math.roundToInt @@ -46,40 +45,28 @@ internal class LayoutResolver( val minMargins = baseMinMargins * settings.minMargins.toFloat() * systemFontScale - val actualMinMargins = when (settings.verticalText) { - true -> { - minMargins.coerceAtLeast(max(safeDrawing.top, safeDrawing.bottom)) - } - false -> { - minMargins.coerceAtLeast(max(safeDrawing.left, safeDrawing.right)) - } + val minMarginsWithInsets = when (settings.verticalText) { + true -> minMargins.coerceAtLeast(max(safeDrawing.top, safeDrawing.bottom)) + false -> minMargins.coerceAtLeast(max(safeDrawing.left, safeDrawing.right)) } - var layout = when (settings.scroll) { - true -> scrolledLayout( - viewportSize = if (settings.verticalText) viewportSize.height else viewportSize.width, - minimalMargins = actualMinMargins, - maximalLineLength = maxLineLength - ) + return when (settings.scroll) { + true -> + scrolledLayout( + viewportSize = if (settings.verticalText) viewportSize.height else viewportSize.width, + minimalMargins = minMarginsWithInsets, + maximalLineLength = maxLineLength + ) false -> paginatedLayout( viewportWidth = viewportSize.width, requestedColCount = settings.columnCount, - minimalMargins = actualMinMargins, + minimalMargins = minMarginsWithInsets, optimalLineLength = optimalLineLength, maximalLineLength = maxLineLength, minimalLineLength = minLineLength ) } - - // CSS zoom multiplies the px line value by - // the zoom factor so we need to do the reverse thing. - // If we don't, line length decreases with fontSize. - layout = layout.copy( - lineLength = (layout.lineLength.value / settings.fontSize).dp, - ) - - return layout } private fun scrolledLayout( From 48506db8048bd07638e3be04910eed7b828e562a Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 16 Jan 2026 17:36:19 +0100 Subject: [PATCH 34/56] Fix again crash on change in spread setting --- .../readium/navigator/web/fixedlayout/FixedWebRenditionState.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 0eade8c782..042cd94e5d 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -94,7 +94,7 @@ public class FixedWebRenditionState internal constructor( internal val lastMeasureInfoState: State = derivedStateOf { FixedLayoutMeasureInfo( currentSpread = pagerState.currentPage, - pagerLayoutInfo = pagerState.layoutInfo, + pagerLayoutInfo = Snapshot.withoutReadObservation { pagerState.layoutInfo }, layout = Snapshot.withoutReadObservation { layoutDelegate.layout.value } ) } From 583d0adb6f457446920e8e259fa69b74d3daf011 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Mon, 19 Jan 2026 17:23:51 +0100 Subject: [PATCH 35/56] Adjust selection iframe rect to parent in single spread FXL --- .../decorations/HighlightsManager.kt | 2 +- .../web/fixedlayout/FixedWebRenditionState.kt | 23 ++++--------------- .../src/bridge/all-selection-bridge.ts | 21 +++++++++++++++-- .../scripts/src/common/decoration.ts | 9 +++++++- .../scripts/src/index-fixed-single.ts | 1 + .../generated/fixed-double-script.js.map | 2 +- .../generated/fixed-injectable-script.js | 2 +- .../generated/fixed-injectable-script.js.map | 2 +- .../generated/fixed-single-script.js | 2 +- .../generated/fixed-single-script.js.map | 2 +- .../generated/reflowable-injectable-script.js | 2 +- .../reflowable-injectable-script.js.map | 2 +- 12 files changed, 40 insertions(+), 30 deletions(-) diff --git a/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt b/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt index 0616647c7a..d33c9d72fe 100644 --- a/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt +++ b/demos/navigator/src/main/java/org/readium/demo/navigator/decorations/HighlightsManager.kt @@ -62,8 +62,8 @@ sealed class HighlightsManager( @ColorInt tint: Int, annotation: String = "", ): Long { - val id = lastHighlightId + 1 lastHighlightId += 1 + val id = lastHighlightId val highlight = Highlight( locator = locator, diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 042cd94e5d..7b604a3da4 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -10,7 +10,6 @@ package org.readium.navigator.web.fixedlayout import android.app.Application import androidx.compose.foundation.MutatePriority -import androidx.compose.foundation.pager.PagerLayoutInfo import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.MutableState import androidx.compose.runtime.Stable @@ -25,11 +24,6 @@ import androidx.compose.runtime.snapshots.SnapshotStateMap import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentMapOf -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.SupervisorJob -import kotlinx.coroutines.async -import kotlinx.coroutines.awaitAll -import kotlinx.coroutines.currentCoroutineContext import org.readium.navigator.common.DecorationController import org.readium.navigator.common.NavigationController import org.readium.navigator.common.Overflow @@ -94,7 +88,6 @@ public class FixedWebRenditionState internal constructor( internal val lastMeasureInfoState: State = derivedStateOf { FixedLayoutMeasureInfo( currentSpread = pagerState.currentPage, - pagerLayoutInfo = Snapshot.withoutReadObservation { pagerState.layoutInfo }, layout = Snapshot.withoutReadObservation { layoutDelegate.layout.value } ) } @@ -192,7 +185,6 @@ internal data class FixedWebPreloadedData( internal class FixedLayoutMeasureInfo( val currentSpread: Int, - val pagerLayoutInfo: PagerLayoutInfo, val layout: Layout, ) @@ -308,17 +300,10 @@ internal class FixedSelectionDelegate( override suspend fun currentSelection(): Selection? { val lastMeasureInfoNow = lastMeasureInfoState.value - val visiblePages = lastMeasureInfoNow.pagerLayoutInfo.visiblePagesInfo.map { it.index } - val coroutineScope = CoroutineScope(currentCoroutineContext() + SupervisorJob()) - val (page, selection) = visiblePages - .mapNotNull { index -> selectionApis[index]?.let { index to it } } - .map { (index, api) -> - coroutineScope.async { - api.getCurrentSelection(index, lastMeasureInfoNow.layout) - } - }.awaitAll() - .filterNotNull() - .firstOrNull() + val currentSpreadNow = lastMeasureInfoNow.currentSpread + + val (page, selection) = selectionApis[currentSpreadNow] + ?.getCurrentSelection(currentSpreadNow, lastMeasureInfoNow.layout) ?: return null return Selection( diff --git a/readium/navigators/web/internals/scripts/src/bridge/all-selection-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/all-selection-bridge.ts index d590e9e3f6..403edfa523 100644 --- a/readium/navigators/web/internals/scripts/src/bridge/all-selection-bridge.ts +++ b/readium/navigators/web/internals/scripts/src/bridge/all-selection-bridge.ts @@ -25,18 +25,35 @@ export class ReflowableSelectionBridge { } export class FixedSingleSelectionBridge { + private readonly iframe: HTMLIFrameElement + private readonly wrapper: SelectionWrapperParentSide private readonly listener: FixedSingleSelectionBridge.Listener - constructor(listener: FixedSingleSelectionBridge.Listener) { + constructor( + iframe: HTMLIFrameElement, + listener: FixedSingleSelectionBridge.Listener + ) { + this.iframe = iframe this.listener = listener const wrapperListener = { onSelectionAvailable: ( requestId: string, selection: Selection | null ) => { - const selectionAsJson = JSON.stringify(selection) + let adjustedSelection + + if (selection) { + adjustedSelection = selectionToParentCoordinates( + selection, + this.iframe + ) + } else { + adjustedSelection = selection + } + + const selectionAsJson = JSON.stringify(adjustedSelection) this.listener.onSelectionAvailable(requestId, selectionAsJson) }, } diff --git a/readium/navigators/web/internals/scripts/src/common/decoration.ts b/readium/navigators/web/internals/scripts/src/common/decoration.ts index d89e7acd04..cfdbfabc96 100644 --- a/readium/navigators/web/internals/scripts/src/common/decoration.ts +++ b/readium/navigators/web/internals/scripts/src/common/decoration.ts @@ -194,6 +194,7 @@ class DecorationGroup { decoration.cssSelector, decoration.textQuote ) + log(`range ${range}`) if (!range) { log("Can't locate DOM range for decoration", decoration) return @@ -260,6 +261,7 @@ class DecorationGroup { * Layouts a single Decoration item. */ private layout(item: DecorationItem) { + log(`layout ${item}`) const groupContainer = this.requireContainer() const unsafeStyle = this.styles.get(item.decoration.style) @@ -509,7 +511,12 @@ export function rangeFromDecorationTarget( suffix: textQuote.textAfter, }) - return anchor.toRange() + try { + return anchor.toRange() + } catch (e) { + log(e) + return null + } } else { const range = document.createRange() range.setStartBefore(root) diff --git a/readium/navigators/web/internals/scripts/src/index-fixed-single.ts b/readium/navigators/web/internals/scripts/src/index-fixed-single.ts index 8f2cd20258..be27e32ccd 100644 --- a/readium/navigators/web/internals/scripts/src/index-fixed-single.ts +++ b/readium/navigators/web/internals/scripts/src/index-fixed-single.ts @@ -50,6 +50,7 @@ window.singleArea = new FixedSingleAreaBridge( ) window.singleSelection = new FixedSingleSelectionBridge( + iframe, window.singleSelectionListener ) diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map index c775a54a24..bcef1cc4a7 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-double-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAKF,EAAOD,GAE1EI,EAAQb,EAAa,qCAAqC,GAC1Dc,EAAkBd,EAAa,2BAA2B,GAC1De,EAAOf,EAAa,cAExB,GAAIc,EACH,IACCA,EAAgB,CAAC,EAAG,IAAK,CAAEE,MAAO,GACnC,CAAE,MAAOC,GAERH,EAAkB,IACnB,CAGDX,EAAOC,QAAU,SAAkBc,GAClC,IAAIC,EAAOR,EAAcH,EAAME,EAAOU,WAYtC,OAXIP,GAASC,GACDD,EAAMM,EAAM,UACdE,cAERP,EACCK,EACA,SACA,CAAEH,MAAO,EAAID,EAAK,EAAGG,EAAiBI,QAAUF,UAAUE,OAAS,MAI/DH,CACR,EAEA,IAAII,EAAY,WACf,OAAOZ,EAAcH,EAAMC,EAAQW,UACpC,EAEIN,EACHA,EAAgBX,EAAOC,QAAS,QAAS,CAAEY,MAAOO,IAElDpB,EAAOC,QAAQoB,MAAQD,C,oCC3CxB,IAAIE,EAAyB,EAAQ,IAAR,GAEzBzB,EAAe,EAAQ,MAEvBc,EAAkBW,GAA0Bz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B,CACA,sBAAAF,GACIvtB,KAAK+sB,yBAA2B,EACI,GAAhC/sB,KAAK+sB,yBACL/sB,KAAKwgB,SAASkN,yBAEtB,CACA,uBAAAF,GACIxtB,KAAKgtB,0BAA4B,EACI,GAAjChtB,KAAKgtB,0BACLhtB,KAAKwgB,SAASmN,0BAEtB,GJpH8D/Z,OAAQA,OAAOga,cAAerI,EAAYC,EAAa5R,OAAO+W,WAAY/W,OAAO2X,gBAAiB3X,OAAOwY,mBAC3KxY,OAAOga,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/double-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/index-fixed-double.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class DoubleAreaManager {\n constructor(window, leftIframe, rightIframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n const leftPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n const rightPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.leftPage = new PageManager(window, leftIframe, leftPageListener);\n this.rightPage = new PageManager(window, rightIframe, rightPageListener);\n this.metaViewport = metaViewport;\n }\n setLeftMessagePort(messagePort) {\n this.leftPage.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightPage.setMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.leftPage.hide();\n this.rightPage.hide();\n this.spread = spread;\n if (spread.left) {\n this.leftPage.loadPage(spread.left);\n }\n if (spread.right) {\n this.rightPage.loadPage(spread.right);\n }\n }\n setViewport(size, insets) {\n if (this.viewport == size && this.insets == insets) {\n return;\n }\n this.viewport = size;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n layout() {\n if (!this.viewport ||\n (!this.leftPage.size && this.spread.left) ||\n (!this.rightPage.size && this.spread.right)) {\n return;\n }\n const leftMargins = {\n top: this.insets.top,\n right: 0,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.leftPage.setMargins(leftMargins);\n const rightMargins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: 0,\n };\n this.rightPage.setMargins(rightMargins);\n if (!this.spread.right) {\n this.rightPage.setPlaceholder(this.leftPage.size);\n }\n else if (!this.spread.left) {\n this.leftPage.setPlaceholder(this.rightPage.size);\n }\n const contentWidth = this.leftPage.size.width + this.rightPage.size.width;\n const contentHeight = Math.max(this.leftPage.size.height, this.rightPage.size.height);\n const contentSize = { width: contentWidth, height: contentHeight };\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, contentSize, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(contentWidth)\n .setHeight(contentHeight)\n .build();\n this.leftPage.show();\n this.rightPage.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedDoubleAreaBridge as FixedDoubleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedDoubleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedDoubleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedDoubleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst leftIframe = document.getElementById(\"page-left\");\nconst rightIframe = document.getElementById(\"page-right\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nWindow.prototype.doubleArea = new FixedDoubleAreaBridge(window, leftIframe, rightIframe, metaViewport, window.gestures, window.documentState);\nwindow.doubleSelection = new FixedDoubleSelectionBridge(leftIframe, rightIframe, window.doubleSelectionListener);\nwindow.doubleDecorations = new FixedDoubleDecorationsBridge();\nwindow.doubleInitialization = new FixedDoubleInitializationBridge(window, window.fixedApiState, leftIframe, rightIframe, window.doubleArea, window.doubleSelection, window.doubleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","event","data","kind","onContentSizeAvailable","onTap","onLinkActivated","onDecorationActivated","URL","href","outerHtml","_a","onIframeLoaded","offsetToParentCoordinates","offset","iframeRect","visualViewport","offsetLeft","scale","offsetTop","rectToParentCoordinates","rect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","ViewportStringBuilder","setInitialScale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","DoubleAreaManager","leftIframe","rightIframe","metaViewport","fit","insets","clientX","clientY","leftPageListener","layout","gestureEvent","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","id","group","rightPageListener","leftPage","rightPage","setLeftMessagePort","setRightMessagePort","loadSpread","spread","setViewport","viewport","setFit","leftMargins","rightMargins","contentWidth","contentHeight","contentSize","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","onLayout","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","stringify","stringOffset","stringRect","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","TrimDirection","ResolveDirection","selectionToParentCoordinates","selection","selectionRect","selectedText","textBefore","textAfter","selectionListener","onFeedback","requestSelection","requestId","send","clearSelection","feedback","onSelectionAvailable","postMessage","registerTemplates","templates","addDecoration","decoration","removeDecoration","getElementById","querySelector","Window","doubleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","doubleSelection","requestStates","isLeftInitialized","isRightInitialized","leftWrapperListener","resolvedSelection","leftWrapper","rightWrapperListener","rightWrapper","requestState","delete","selectionAsJson","doubleSelectionListener","doubleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","doubleInitialization","areaBridge","selectionBridge","decorationsBridge","areaReadySemaphore","selectionReadySemaphore","decorationReadySemaphore","ports","onInitMessageLeft","onInitMessageRight","pageNb","initMessage","onInitAreaMessage","onInitSelectionMessage","onInitDecorationMessage","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-double-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAKF,EAAOD,GAE1EI,EAAQb,EAAa,qCAAqC,GAC1Dc,EAAkBd,EAAa,2BAA2B,GAC1De,EAAOf,EAAa,cAExB,GAAIc,EACH,IACCA,EAAgB,CAAC,EAAG,IAAK,CAAEE,MAAO,GACnC,CAAE,MAAOC,GAERH,EAAkB,IACnB,CAGDX,EAAOC,QAAU,SAAkBc,GAClC,IAAIC,EAAOR,EAAcH,EAAME,EAAOU,WAYtC,OAXIP,GAASC,GACDD,EAAMM,EAAM,UACdE,cAERP,EACCK,EACA,SACA,CAAEH,MAAO,EAAID,EAAK,EAAGG,EAAiBI,QAAUF,UAAUE,OAAS,MAI/DH,CACR,EAEA,IAAII,EAAY,WACf,OAAOZ,EAAcH,EAAMC,EAAQW,UACpC,EAEIN,EACHA,EAAgBX,EAAOC,QAAS,QAAS,CAAEY,MAAOO,IAElDpB,EAAOC,QAAQoB,MAAQD,C,oCC3CxB,IAAIE,EAAyB,EAAQ,IAAR,GAEzBzB,EAAe,EAAQ,MAEvBc,EAAkBW,GAA0BzB,EAAa,2BAA2B,GAEpF0B,EAAe1B,EAAa,iBAC5B2B,EAAa3B,EAAa,eAE1B4B,EAAO,EAA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CACA,uBAAAF,GACIvtB,KAAK+sB,0BAA4B,EACI,GAAjC/sB,KAAK+sB,0BACL/sB,KAAKwgB,SAASkN,0BAEtB,GJpH8D9Z,OAAQA,OAAO+Z,cAAepI,EAAYC,EAAa5R,OAAO8W,WAAY9W,OAAO0X,gBAAiB1X,OAAOuY,mBAC3KvY,OAAO+Z,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/double-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/index-fixed-double.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class DoubleAreaManager {\n constructor(window, leftIframe, rightIframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n const leftPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n const rightPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.leftPage = new PageManager(window, leftIframe, leftPageListener);\n this.rightPage = new PageManager(window, rightIframe, rightPageListener);\n this.metaViewport = metaViewport;\n }\n setLeftMessagePort(messagePort) {\n this.leftPage.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightPage.setMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.leftPage.hide();\n this.rightPage.hide();\n this.spread = spread;\n if (spread.left) {\n this.leftPage.loadPage(spread.left);\n }\n if (spread.right) {\n this.rightPage.loadPage(spread.right);\n }\n }\n setViewport(size, insets) {\n if (this.viewport == size && this.insets == insets) {\n return;\n }\n this.viewport = size;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n layout() {\n if (!this.viewport ||\n (!this.leftPage.size && this.spread.left) ||\n (!this.rightPage.size && this.spread.right)) {\n return;\n }\n const leftMargins = {\n top: this.insets.top,\n right: 0,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.leftPage.setMargins(leftMargins);\n const rightMargins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: 0,\n };\n this.rightPage.setMargins(rightMargins);\n if (!this.spread.right) {\n this.rightPage.setPlaceholder(this.leftPage.size);\n }\n else if (!this.spread.left) {\n this.leftPage.setPlaceholder(this.rightPage.size);\n }\n const contentWidth = this.leftPage.size.width + this.rightPage.size.width;\n const contentHeight = Math.max(this.leftPage.size.height, this.rightPage.size.height);\n const contentSize = { width: contentWidth, height: contentHeight };\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, contentSize, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(contentWidth)\n .setHeight(contentHeight)\n .build();\n this.leftPage.show();\n this.rightPage.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedDoubleAreaBridge as FixedDoubleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedDoubleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedDoubleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedDoubleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst leftIframe = document.getElementById(\"page-left\");\nconst rightIframe = document.getElementById(\"page-right\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nWindow.prototype.doubleArea = new FixedDoubleAreaBridge(window, leftIframe, rightIframe, metaViewport, window.gestures, window.documentState);\nwindow.doubleSelection = new FixedDoubleSelectionBridge(leftIframe, rightIframe, window.doubleSelectionListener);\nwindow.doubleDecorations = new FixedDoubleDecorationsBridge();\nwindow.doubleInitialization = new FixedDoubleInitializationBridge(window, window.fixedApiState, leftIframe, rightIframe, window.doubleArea, window.doubleSelection, window.doubleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","event","data","kind","onContentSizeAvailable","onTap","onLinkActivated","onDecorationActivated","URL","href","outerHtml","_a","onIframeLoaded","offsetToParentCoordinates","offset","iframeRect","visualViewport","offsetLeft","scale","offsetTop","rectToParentCoordinates","rect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","ViewportStringBuilder","setInitialScale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","DoubleAreaManager","leftIframe","rightIframe","metaViewport","fit","insets","clientX","clientY","leftPageListener","layout","gestureEvent","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","id","group","rightPageListener","leftPage","rightPage","setLeftMessagePort","setRightMessagePort","loadSpread","spread","setViewport","viewport","setFit","leftMargins","rightMargins","contentWidth","contentHeight","contentSize","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","onLayout","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","stringify","stringOffset","stringRect","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","TrimDirection","ResolveDirection","selection","selectionRect","selectedText","textBefore","textAfter","selectionListener","onFeedback","requestSelection","requestId","send","clearSelection","feedback","onSelectionAvailable","postMessage","registerTemplates","templates","addDecoration","decoration","removeDecoration","getElementById","querySelector","Window","doubleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","doubleSelection","requestStates","isLeftInitialized","isRightInitialized","leftWrapperListener","resolvedSelection","leftWrapper","rightWrapperListener","rightWrapper","requestState","delete","selectionAsJson","doubleSelectionListener","doubleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","doubleInitialization","areaBridge","selectionBridge","decorationsBridge","areaReadySemaphore","selectionReadySemaphore","decorationReadySemaphore","ports","onInitMessageLeft","onInitMessageRight","pageNb","initMessage","onInitAreaMessage","onInitSelectionMessage","onInitDecorationMessage","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js index a844b9f970..5cbc752523 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(b)===y&&(h[g]|=1<0&&w[m]>=r+i;)m-=1;m===a&&w[m]<=r&&(w[m]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var m=c(u,h);u=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(d[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var N=r(7002),F=N.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function W(t){return w.call(String(t),/"/g,""")}function L(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!q(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return g?D(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return g?D(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return L(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:K(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(L(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&N)return N(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return K(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?m.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return G.call(t,e)}function H(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function K(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=L(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,w=p(g,"u")>-1;return n(d,r,m,w)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),w=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof w&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return c(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===g(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return b.set(t,"[[Done]]",!0),c(a,!1)})),o&&(m(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,g,d=r(1844);function b(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,d.Z)(t,e,r)}function m(t,e){return 0===e.length||0===t.length?0:1-b(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(g||(g={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===g.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=b(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?m(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?m(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,d=(c?h:y)/g;function b(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${d}px`;const r=Math.floor(e.top/d)*d;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${d}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/d)*d;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const m=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,m,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,b(t,m,m,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}var C=r(5155);r.n(C)().shim();class T{constructor(t,e){this.decorationManager=e,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"registerTemplates":return this.registerTemplates(t.templates);case"addDecoration":return this.addDecoration(t.decoration,t.group);case"removeDecoration":return this.removeDecoration(t.id,t.group)}}registerTemplates(t){this.decorationManager.registerTemplates(t)}addDecoration(t,e){this.decorationManager.addDecoration(t,e)}removeDecoration(t,e){this.decorationManager.removeDecoration(t,e)}}class I{constructor(t){this.messagePort=t}send(t){this.messagePort.postMessage(t)}}class M{constructor(t,e){this.selectionManager=e,this.messagePort=t,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"requestSelection":return this.onRequestSelection(t.requestId);case"clearSelection":return this.onClearSelection()}}onRequestSelection(t){const e={kind:"selectionAvailable",requestId:t,selection:this.selectionManager.getCurrentSelection()};this.sendFeedback(e)}onClearSelection(){this.selectionManager.clearSelection()}sendFeedback(t){this.messagePort.postMessage(t)}}const $=new class{constructor(t){this.window=t}initAreaManager(){const t=this.initChannel("InitAreaManager");return new I(t)}initSelection(t){const e=this.initChannel("InitSelection");new M(e,t)}initDecorations(t){const e=this.initChannel("InitDecorations");new T(e,t)}initChannel(t){const e=new MessageChannel;return this.window.parent.postMessage(t,"*",[e.port2]),e.port1}}(window),D=$.initAreaManager(),N=new class{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}(window);$.initSelection(N);const F=new class{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new R(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}(window);$.initDecorations(F);const k=function(t){const e=window.document.querySelector("meta[name=viewport]");if(e&&e instanceof HTMLMetaElement)return function(t){const e=/(\w+) *= *([^\s,]+)/g,r=new Map;let n;for(;n=e.exec(t);)null!=n&&r.set(n[1],n[2]);const o=parseFloat(r.get("width")),i=parseFloat(r.get("height"));return o&&i?{width:o,height:i}:void 0}(e.content)}();D.send({kind:"contentSize",size:k});const B=new class{constructor(t){this.messageSender=t}onTap(t){const e={offset:{x:t.clientX,y:t.clientY}};this.messageSender.send({kind:"tap",event:e})}onLinkActivated(t,e){this.messageSender.send({kind:"linkActivated",href:t,outerHtml:e})}onDecorationActivated(t){const e={id:t.id,group:t.group,rect:t.rect,offset:{x:t.event.clientX,y:t.event.clientY}};this.messageSender.send({kind:"decorationActivated",event:e})}}(D);new class{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}(window,B,F)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(b)===y&&(h[g]|=1<0&&w[m]>=r+i;)m-=1;m===a&&w[m]<=r&&(w[m]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var m=c(u,h);u=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(d[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var N=r(7002),F=N.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function W(t){return w.call(String(t),/"/g,""")}function L(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!q(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return g?D(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return g?D(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return L(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:K(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(L(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&N)return N(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return K(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?m.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return G.call(t,e)}function H(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function K(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=L(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,w=p(g,"u")>-1;return n(d,r,m,w)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),w=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof w&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return c(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===g(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return b.set(t,"[[Done]]",!0),c(a,!1)})),o&&(m(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,g,d=r(1844);function b(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,d.Z)(t,e,r)}function m(t,e){return 0===e.length||0===t.length?0:1-b(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(g||(g={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===g.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=b(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?m(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?m(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,g=u?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,b=(u?g:h)/d;function m(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${b}px`;const r=Math.floor(e.top/b)*b;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${b}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/b)*b;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,m(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}var C=r(5155);r.n(C)().shim();class T{constructor(t,e){this.decorationManager=e,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"registerTemplates":return this.registerTemplates(t.templates);case"addDecoration":return this.addDecoration(t.decoration,t.group);case"removeDecoration":return this.removeDecoration(t.id,t.group)}}registerTemplates(t){this.decorationManager.registerTemplates(t)}addDecoration(t,e){this.decorationManager.addDecoration(t,e)}removeDecoration(t,e){this.decorationManager.removeDecoration(t,e)}}class I{constructor(t){this.messagePort=t}send(t){this.messagePort.postMessage(t)}}class M{constructor(t,e){this.selectionManager=e,this.messagePort=t,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"requestSelection":return this.onRequestSelection(t.requestId);case"clearSelection":return this.onClearSelection()}}onRequestSelection(t){const e={kind:"selectionAvailable",requestId:t,selection:this.selectionManager.getCurrentSelection()};this.sendFeedback(e)}onClearSelection(){this.selectionManager.clearSelection()}sendFeedback(t){this.messagePort.postMessage(t)}}const $=new class{constructor(t){this.window=t}initAreaManager(){const t=this.initChannel("InitAreaManager");return new I(t)}initSelection(t){const e=this.initChannel("InitSelection");new M(e,t)}initDecorations(t){const e=this.initChannel("InitDecorations");new T(e,t)}initChannel(t){const e=new MessageChannel;return this.window.parent.postMessage(t,"*",[e.port2]),e.port1}}(window),D=$.initAreaManager(),N=new class{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}(window);$.initSelection(N);const F=new class{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new R(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}(window);$.initDecorations(F);const k=function(t){const e=window.document.querySelector("meta[name=viewport]");if(e&&e instanceof HTMLMetaElement)return function(t){const e=/(\w+) *= *([^\s,]+)/g,r=new Map;let n;for(;n=e.exec(t);)null!=n&&r.set(n[1],n[2]);const o=parseFloat(r.get("width")),i=parseFloat(r.get("height"));return o&&i?{width:o,height:i}:void 0}(e.content)}();D.send({kind:"contentSize",size:k});const B=new class{constructor(t){this.messageSender=t}onTap(t){const e={offset:{x:t.clientX,y:t.clientY}};this.messageSender.send({kind:"tap",event:e})}onLinkActivated(t,e){this.messageSender.send({kind:"linkActivated",href:t,outerHtml:e})}onDecorationActivated(t){const e={id:t.id,group:t.group,rect:t.rect,offset:{x:t.event.clientX,y:t.event.clientY}};this.messageSender.send({kind:"decorationActivated",event:e})}}(D);new class{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}(window,B,F)}()}(); //# sourceMappingURL=fixed-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map index 24488c9f61..1b7fa45f84 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GA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B,OALA/0B,KAAKy0B,SAASJ,gBAAgBO,EAAeN,KAAMM,EAAeI,WAClE1B,EAAM2B,kBACN3B,EAAM4B,gBAKd,CAGIL,EADA70B,KAAK2uB,kBAED3uB,KAAK2uB,kBAAkB0E,2BAA2BC,GAG3B,KAE3BuB,EACA70B,KAAKy0B,SAASD,sBAAsBK,GAGpC70B,KAAKy0B,SAASN,MAAMb,EAI5B,CAEA,yBAAAwB,CAA0BhP,GACtB,OAAe,MAAXA,EACO,MAgBqD,GAdxC,CACpB,IACA,QACA,SACA,SACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,SAEgBtY,QAAQsY,EAAQ3X,SAASxD,gBAIzCmb,EAAQqP,aAAa,oBACoC,SAAzDrP,EAAQ1X,aAAa,mBAAmBzD,cAJjCmb,EAQPA,EAAQW,cACDzmB,KAAK80B,0BAA0BhP,EAAQW,eAE3C,IACX,GH1BiB5T,OAAQqhB,EAAmBvF,E","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/fixed/iframe-message.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-injectable.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","export class IframeMessageSender {\n constructor(messagePort) {\n this.messagePort = messagePort;\n }\n send(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\n/**\n * Script loaded by fixed layout resources.\n */\nimport { DecorationManager, } from \"./common/decoration\";\nimport { GesturesDetector } from \"./common/gestures\";\nimport { SelectionManager } from \"./common/selection\";\nimport { parseViewportString } from \"./util/viewport\";\nimport { FixedInitializerIframeSide } from \"./bridge/all-initialization-bridge\";\nconst initializer = new FixedInitializerIframeSide(window);\nconst messageSender = initializer.initAreaManager();\nconst selectionManager = new SelectionManager(window);\ninitializer.initSelection(selectionManager);\nconst decorationManager = new DecorationManager(window);\ninitializer.initDecorations(decorationManager);\nconst viewportSize = parseContentSize(window.document);\nmessageSender.send({ kind: \"contentSize\", size: viewportSize });\nclass MessagingGesturesListener {\n constructor(messageSender) {\n this.messageSender = messageSender;\n }\n onTap(gestureEvent) {\n const event = {\n offset: { x: gestureEvent.clientX, y: gestureEvent.clientY },\n };\n this.messageSender.send({ kind: \"tap\", event: event });\n }\n onLinkActivated(href, outerHtml) {\n this.messageSender.send({\n kind: \"linkActivated\",\n href: href,\n outerHtml: outerHtml,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated(gestureEvent) {\n const event = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: gestureEvent.rect,\n offset: { x: gestureEvent.event.clientX, y: gestureEvent.event.clientY },\n };\n this.messageSender.send({\n kind: \"decorationActivated\",\n event: event,\n });\n }\n}\nconst messagingListener = new MessagingGesturesListener(messageSender);\nnew GesturesDetector(window, messagingListener, decorationManager);\nfunction parseContentSize(document) {\n const viewport = document.querySelector(\"meta[name=viewport]\");\n if (!viewport || !(viewport instanceof HTMLMetaElement)) {\n return undefined;\n }\n return parseViewportString(viewport.content);\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationGroup","id","styles","items","lastItemId","container","groupId","groupName","add","decoration","cssSelector","textQuote","querySelector","body","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","item","clickableElements","layout","remove","findIndex","it","relayout","clearContainer","requireContainer","createElement","dataset","group","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","clientWidth","getBoundingClientRect","DOMRect","elementTemplate","template","innerHTML","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","DecorationWrapperIframeSide","messagePort","decorationManager","onmessage","onCommand","command","kind","registerTemplates","templates","addDecoration","removeDecoration","IframeMessageSender","send","postMessage","SelectionWrapperIframeSide","manager","selectionManager","onRequestSelection","requestId","onClearSelection","feedback","selection","getCurrentSelection","sendFeedback","clearSelection","initializer","initAreaManager","initChannel","initSelection","initDecorations","initMessage","messageChannel","MessageChannel","port2","port1","messageSender","isSelecting","getSelection","removeAllRanges","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","groups","lastGroupId","addEventListener","lastSize","ResizeObserver","requestAnimationFrame","clientHeight","relayoutDecorations","observe","stylesheet","styleElement","getElementsByTagName","appendChild","getGroup","values","handleDecorationClickEvent","event","groupContent","clientX","clientY","findTarget","viewportSize","viewport","HTMLMetaElement","viewportString","properties","parseViewportString","parseContentSize","messagingListener","onTap","gestureEvent","onLinkActivated","href","outerHtml","onDecorationActivated","listener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","hasAttribute"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO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OAAe,MAAXA,EACO,MAgBqD,GAdxC,CACpB,IACA,QACA,SACA,SACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,SAEgBtY,QAAQsY,EAAQ3X,SAASxD,gBAIzCmb,EAAQsP,aAAa,oBACoC,SAAzDtP,EAAQ1X,aAAa,mBAAmBzD,cAJjCmb,EAQPA,EAAQW,cACDzmB,KAAK+0B,0BAA0BjP,EAAQW,eAE3C,IACX,GH1BiB5T,OAAQshB,EAAmBvF,E","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/fixed/iframe-message.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-injectable.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","export class IframeMessageSender {\n constructor(messagePort) {\n this.messagePort = messagePort;\n }\n send(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\n/**\n * Script loaded by fixed layout resources.\n */\nimport { DecorationManager, } from \"./common/decoration\";\nimport { GesturesDetector } from \"./common/gestures\";\nimport { SelectionManager } from \"./common/selection\";\nimport { parseViewportString } from \"./util/viewport\";\nimport { FixedInitializerIframeSide } from \"./bridge/all-initialization-bridge\";\nconst initializer = new FixedInitializerIframeSide(window);\nconst messageSender = initializer.initAreaManager();\nconst selectionManager = new SelectionManager(window);\ninitializer.initSelection(selectionManager);\nconst decorationManager = new DecorationManager(window);\ninitializer.initDecorations(decorationManager);\nconst viewportSize = parseContentSize(window.document);\nmessageSender.send({ kind: \"contentSize\", size: viewportSize });\nclass MessagingGesturesListener {\n constructor(messageSender) {\n this.messageSender = messageSender;\n }\n onTap(gestureEvent) {\n const event = {\n offset: { x: gestureEvent.clientX, y: gestureEvent.clientY },\n };\n this.messageSender.send({ kind: \"tap\", event: event });\n }\n onLinkActivated(href, outerHtml) {\n this.messageSender.send({\n kind: \"linkActivated\",\n href: href,\n outerHtml: outerHtml,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated(gestureEvent) {\n const event = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: gestureEvent.rect,\n offset: { x: gestureEvent.event.clientX, y: gestureEvent.event.clientY },\n };\n this.messageSender.send({\n kind: \"decorationActivated\",\n event: event,\n });\n }\n}\nconst messagingListener = new MessagingGesturesListener(messageSender);\nnew GesturesDetector(window, messagingListener, decorationManager);\nfunction parseContentSize(document) {\n const viewport = document.querySelector(\"meta[name=viewport]\");\n if (!viewport || !(viewport instanceof HTMLMetaElement)) {\n return undefined;\n }\n return parseViewportString(viewport.content);\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationGroup","id","styles","items","lastItemId","container","groupId","groupName","add","decoration","cssSelector","textQuote","querySelector","body","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","item","clickableElements","layout","remove","findIndex","it","relayout","clearContainer","requireContainer","createElement","dataset","group","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","clientWidth","getBoundingClientRect","DOMRect","elementTemplate","template","innerHTML","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","DecorationWrapperIframeSide","messagePort","decorationManager","onmessage","onCommand","command","kind","registerTemplates","templates","addDecoration","removeDecoration","IframeMessageSender","send","postMessage","SelectionWrapperIframeSide","manager","selectionManager","onRequestSelection","requestId","onClearSelection","feedback","selection","getCurrentSelection","sendFeedback","clearSelection","initializer","initAreaManager","initChannel","initSelection","initDecorations","initMessage","messageChannel","MessageChannel","port2","port1","messageSender","isSelecting","getSelection","removeAllRanges","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","groups","lastGroupId","addEventListener","lastSize","ResizeObserver","requestAnimationFrame","clientHeight","relayoutDecorations","observe","stylesheet","styleElement","getElementsByTagName","appendChild","getGroup","values","handleDecorationClickEvent","event","groupContent","clientX","clientY","findTarget","viewportSize","viewport","HTMLMetaElement","viewportString","properties","parseViewportString","parseContentSize","messagingListener","onTap","gestureEvent","onLinkActivated","href","outerHtml","onDecorationActivated","listener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","hasAttribute"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js index 4ec13a38a7..e6005488bf 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js @@ -1,2 +1,2 @@ -!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],A(r,x([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(b[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function C(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var k=r(7002),B=k.custom,L=_(B)?B:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==z(t)||T&&"object"==typeof t&&T in t)}function $(t){return!("[object RegExp]"!==z(t)||T&&"object"==typeof t&&T in t)}function _(t){if(D)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?C(e,w):w}if("bigint"==typeof e){var x=String(e)+"n";return g?C(e,x):x}var P=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var I,B=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=d.call(b.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=D?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||D?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Z(e,G);return B&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,B)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==z(t)||T&&"object"==typeof t&&T in t)}(e)){var at=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(L&&"function"==typeof e[L]&&k)return k(e,{depth:P-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,B)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(G(t,e))})),Y("Set",c.call(e),ut,B)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(G(E.call(e)));if(function(t){return!("[object Boolean]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==z(t)||T&&"object"==typeof t&&T in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==z(t)||T&&"object"==typeof t&&T in t)}(e)&&!$(e)){var ct=Z(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&T&&Object(e)===e&&T in e?m.call(z(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":B?yt+"{"+Q(ct,B)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function z(t){return g.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return U(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,b=f.matcher,d=s(o(e,"lastIndex"));i(b,"lastIndex",d,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(b,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),b=r(1874),d=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==b(e))throw new i("`S` must be a string");if("Boolean"!==b(r))throw new i("`global` must be a boolean");if("Boolean"!==b(n))throw new i("`fullUnicode` must be a boolean");d.set(this,"[[IteratingRegExp]]",t),d.set(this,"[[IteratedString]]",e),d.set(this,"[[Global]]",r),d.set(this,"[[Unicode]]",n),d.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==b(t))throw new i("receiver must be an object");if(!(t instanceof v&&d.has(t,"[[IteratingRegExp]]")&&d.has(t,"[[IteratedString]]")&&d.has(t,"[[Global]]")&&d.has(t,"[[Unicode]]")&&d.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(d.get(t,"[[Done]]"))return u(void 0,!0);var e=d.get(t,"[[IteratingRegExp]]"),r=d.get(t,"[[IteratedString]]"),n=d.get(t,"[[Global]]"),o=d.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return d.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return d.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),b=r(1874);t.exports=function t(e){if("String"!==b(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}class e{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}class n{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}function o(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(t,r,n,a){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.scale=1,this.listener=a,new i(t,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};a.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}}),this.metaViewport=n;const s={onIframeLoaded:()=>{this.onIframeLoaded()},onTap:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e);a.onTap({offset:n})},onLinkActivated:(t,e)=>{a.onLinkActivated(t,e)},onDecorationActivated:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e),i=function(t,e){const r={x:t.left,y:t.top},n={x:t.right,y:t.bottom},i=o(r,e),a=o(n,e);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}(t.rect,e),s={id:t.id,group:t.group,rect:i,offset:n};a.onDecorationActivated(s)}};this.page=new e(t,r,s)}setMessagePort(t){this.page.setMessagePort(t)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}loadResource(t){this.page.hide(),this.page.loadPage(t)}onIframeLoaded(){this.page.size&&this.layout()}layout(){if(!this.page.size||!this.viewport)return;const t={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:this.insets.left};this.page.setMargins(t);const e={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},r=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,this.page.size,e);this.metaViewport.content=(new n).setInitialScale(r).setMinimumScale(r).setWidth(this.page.size.width).setHeight(this.page.size.height).build(),this.scale=r,this.page.show(),this.listener.onLayout()}}class s{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);r.n(l)().shim();class f{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const p=document.getElementById("page"),y=document.querySelector("meta[name=viewport]");window.singleArea=new class{constructor(e,r,n,o,i){const s=new t(e,o,i);this.manager=new a(e,r,n,s)}setMessagePort(t){this.manager.setMessagePort(t)}loadResource(t){this.manager.loadResource(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,p,y,window.gestures,window.documentState),window.singleSelection=new class{constructor(t){this.listener=t;const e={onSelectionAvailable:(t,e)=>{const r=JSON.stringify(e);this.listener.onSelectionAvailable(t,r)}};this.wrapper=new f(e)}setMessagePort(t){this.wrapper.setMessagePort(t)}requestSelection(t){this.wrapper.requestSelection(t)}clearSelection(){this.wrapper.clearSelection()}}(window.singleSelectionListener),window.singleDecorations=new class{constructor(){this.wrapper=new s}setMessagePort(t){this.wrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.wrapper.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.wrapper.addDecoration(r,e)}removeDecoration(t,e){this.wrapper.removeDecoration(t,e)}},window.singleInitialization=new class{constructor(t,e,r,n,o,i){this.window=t,this.listener=e,this.iframe=r,this.areaBridge=n,this.selectionBridge=o,this.decorationsBridge=i}loadResource(t){this.iframe.src=t,this.window.addEventListener("message",(t=>{console.log("message"),t.ports[0]&&t.source===this.iframe.contentWindow&&this.onInitMessage(t)}))}onInitMessage(t){console.log(`receiving init message ${t}`);const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":return this.initAreaManager(r);case"InitSelection":return this.initSelection(r);case"InitDecorations":return this.initDecorations(r)}}initAreaManager(t){this.areaBridge.setMessagePort(t),this.listener.onAreaApiAvailable()}initSelection(t){this.selectionBridge.setMessagePort(t),this.listener.onSelectionApiAvailable()}initDecorations(t){this.decorationsBridge.setMessagePort(t),this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,p,window.singleArea,window.singleSelection,window.singleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); +!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],A(r,x([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(b[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function C(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var k=r(7002),B=k.custom,L=_(B)?B:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==z(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==z(t)||D&&"object"==typeof t&&D in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?C(e,w):w}if("bigint"==typeof e){var x=String(e)+"n";return g?C(e,x):x}var P=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var I,B=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=d.call(b.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=T?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||T?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Z(e,G);return B&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,B)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==z(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(L&&"function"==typeof e[L]&&k)return k(e,{depth:P-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,B)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(G(t,e))})),Y("Set",c.call(e),ut,B)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(G(E.call(e)));if(function(t){return!("[object Boolean]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==z(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(z(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":B?yt+"{"+Q(ct,B)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function z(t){return g.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return U(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,b=f.matcher,d=s(o(e,"lastIndex"));i(b,"lastIndex",d,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(b,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),b=r(1874),d=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==b(e))throw new i("`S` must be a string");if("Boolean"!==b(r))throw new i("`global` must be a boolean");if("Boolean"!==b(n))throw new i("`fullUnicode` must be a boolean");d.set(this,"[[IteratingRegExp]]",t),d.set(this,"[[IteratedString]]",e),d.set(this,"[[Global]]",r),d.set(this,"[[Unicode]]",n),d.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==b(t))throw new i("receiver must be an object");if(!(t instanceof v&&d.has(t,"[[IteratingRegExp]]")&&d.has(t,"[[IteratedString]]")&&d.has(t,"[[Global]]")&&d.has(t,"[[Unicode]]")&&d.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(d.get(t,"[[Done]]"))return u(void 0,!0);var e=d.get(t,"[[IteratingRegExp]]"),r=d.get(t,"[[IteratedString]]"),n=d.get(t,"[[Global]]"),o=d.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return d.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return d.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),b=r(1874);t.exports=function t(e){if("String"!==b(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}class e{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}class n{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}function o(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function i(t,e){const r={x:t.left,y:t.top},n={x:t.right,y:t.bottom},i=o(r,e),a=o(n,e);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class a{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class s{constructor(t,r,n,s){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.scale=1,this.listener=s,new a(t,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};s.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}}),this.metaViewport=n;const u={onIframeLoaded:()=>{this.onIframeLoaded()},onTap:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e);s.onTap({offset:n})},onLinkActivated:(t,e)=>{s.onLinkActivated(t,e)},onDecorationActivated:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e),a=i(t.rect,e),u={id:t.id,group:t.group,rect:a,offset:n};s.onDecorationActivated(u)}};this.page=new e(t,r,u)}setMessagePort(t){this.page.setMessagePort(t)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}loadResource(t){this.page.hide(),this.page.loadPage(t)}onIframeLoaded(){this.page.size&&this.layout()}layout(){if(!this.page.size||!this.viewport)return;const t={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:this.insets.left};this.page.setMargins(t);const e={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},r=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,this.page.size,e);this.metaViewport.content=(new n).setInitialScale(r).setMinimumScale(r).setWidth(this.page.size.width).setHeight(this.page.size.height).build(),this.scale=r,this.page.show(),this.listener.onLayout()}}class u{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}var c,l;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(c||(c={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(l||(l={}));var f=r(5155);r.n(f)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const y=document.getElementById("page"),h=document.querySelector("meta[name=viewport]");window.singleArea=new class{constructor(e,r,n,o,i){const a=new t(e,o,i);this.manager=new s(e,r,n,a)}setMessagePort(t){this.manager.setMessagePort(t)}loadResource(t){this.manager.loadResource(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,y,h,window.gestures,window.documentState),window.singleSelection=new class{constructor(t,e){this.iframe=t,this.listener=e;const r={onSelectionAvailable:(t,e)=>{let r;r=e?function(t,e){const r=e.getBoundingClientRect(),n=i(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:n,textBefore:t.textBefore,textAfter:t.textAfter}}(e,this.iframe):e;const n=JSON.stringify(r);this.listener.onSelectionAvailable(t,n)}};this.wrapper=new p(r)}setMessagePort(t){this.wrapper.setMessagePort(t)}requestSelection(t){this.wrapper.requestSelection(t)}clearSelection(){this.wrapper.clearSelection()}}(y,window.singleSelectionListener),window.singleDecorations=new class{constructor(){this.wrapper=new u}setMessagePort(t){this.wrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.wrapper.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.wrapper.addDecoration(r,e)}removeDecoration(t,e){this.wrapper.removeDecoration(t,e)}},window.singleInitialization=new class{constructor(t,e,r,n,o,i){this.window=t,this.listener=e,this.iframe=r,this.areaBridge=n,this.selectionBridge=o,this.decorationsBridge=i}loadResource(t){this.iframe.src=t,this.window.addEventListener("message",(t=>{console.log("message"),t.ports[0]&&t.source===this.iframe.contentWindow&&this.onInitMessage(t)}))}onInitMessage(t){console.log(`receiving init message ${t}`);const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":return this.initAreaManager(r);case"InitSelection":return this.initSelection(r);case"InitDecorations":return this.initDecorations(r)}}initAreaManager(t){this.areaBridge.setMessagePort(t),this.listener.onAreaApiAvailable()}initSelection(t){this.selectionBridge.setMessagePort(t),this.listener.onSelectionApiAvailable()}initDecorations(t){this.decorationsBridge.setMessagePort(t),this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,y,window.singleArea,window.singleSelection,window.singleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); //# sourceMappingURL=fixed-single-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map index e98ee69206..cec6c4ba65 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-single-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAKF,EAAOD,GAE1EI,EAAQb,EAAa,qCAAqC,GAC1Dc,EAAkBd,EAAa,2BAA2B,GAC1De,EAAOf,EAAa,cAExB,GAAIc,EACH,IACCA,EAAgB,CAAC,EAAG,IAAK,CAAEE,MAAO,GACnC,CAAE,MAAOC,GAERH,EAAkB,IACnB,CAGDX,EAAOC,QAAU,SAAkBc,GAClC,IAAIC,EAAOR,EAAcH,EAAME,EAAOU,WAYtC,OAXIP,GAASC,GACDD,EAAMM,EAAM,UACdE,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uJ,oBAClB,CACA,aAAAF,CAAc7I,GACV3iB,KAAKgrB,gBAAgBtI,eAAeC,GACpC3iB,KAAKmiB,SAASwJ,yBAClB,CACA,eAAAF,CAAgB9I,GACZ3iB,KAAKirB,kBAAkBvI,eAAeC,GACtC3iB,KAAKmiB,SAASyJ,0BAClB,GJlC8DhY,OAAQA,OAAOiY,cAAe3J,EAAQtO,OAAO2V,WAAY3V,OAAOuW,gBAAiBvW,OAAO4W,mBAC1J5W,OAAOiY,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/single-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-single.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class SingleAreaManager {\n constructor(window, iframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.scale = 1;\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n this.metaViewport = metaViewport;\n const pageListener = {\n onIframeLoaded: () => {\n this.onIframeLoaded();\n },\n onTap: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(event.rect, boundingRect);\n const shiftedEvent = {\n id: event.id,\n group: event.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.page = new PageManager(window, iframe, pageListener);\n }\n setMessagePort(messagePort) {\n this.page.setMessagePort(messagePort);\n }\n setViewport(viewport, insets) {\n if (this.viewport == viewport && this.insets == insets) {\n return;\n }\n this.viewport = viewport;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n loadResource(url) {\n this.page.hide();\n this.page.loadPage(url);\n }\n onIframeLoaded() {\n if (!this.page.size) {\n // FIXME: raise error\n }\n else {\n this.layout();\n }\n }\n layout() {\n if (!this.page.size || !this.viewport) {\n return;\n }\n const margins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.page.setMargins(margins);\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, this.page.size, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(this.page.size.width)\n .setHeight(this.page.size.height)\n .build();\n this.scale = scale;\n this.page.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedSingleAreaBridge as FixedSingleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedSingleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedSingleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedSingleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst iframe = document.getElementById(\"page\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nwindow.singleArea = new FixedSingleAreaBridge(window, iframe, metaViewport, window.gestures, window.documentState);\nwindow.singleSelection = new FixedSingleSelectionBridge(window.singleSelectionListener);\nwindow.singleDecorations = new FixedSingleDecorationsBridge();\nwindow.singleInitialization = new FixedSingleInitializationBridge(window, window.fixedApiState, iframe, window.singleArea, window.singleSelection, window.singleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","onTap","event","stringify","offset","onLinkActivated","href","outerHtml","onDecorationActivated","stringOffset","stringRect","rect","id","group","onLayout","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","data","kind","onContentSizeAvailable","URL","_a","onIframeLoaded","ViewportStringBuilder","setInitialScale","scale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","offsetToParentCoordinates","iframeRect","visualViewport","offsetLeft","offsetTop","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","SingleAreaManager","metaViewport","fit","insets","clientX","clientY","pageListener","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","shiftedEvent","page","setViewport","viewport","layout","setFit","loadResource","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","registerTemplates","templates","send","addDecoration","decoration","removeDecoration","postMessage","TrimDirection","ResolveDirection","selectionListener","onFeedback","requestSelection","requestId","clearSelection","feedback","onSelectionAvailable","selection","getElementById","querySelector","singleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","singleSelection","wrapperListener","selectionAsJson","wrapper","singleSelectionListener","singleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","singleInitialization","areaBridge","selectionBridge","decorationsBridge","console","log","ports","onInitMessage","initMessage","initAreaManager","initSelection","initDecorations","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-single-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,E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uY,cAAejK,EAAQtO,OAAO4V,WAAY5V,OAAOwW,gBAAiBxW,OAAOkX,mBAC1JlX,OAAOuY,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/single-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-single.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class SingleAreaManager {\n constructor(window, iframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.scale = 1;\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n this.metaViewport = metaViewport;\n const pageListener = {\n onIframeLoaded: () => {\n this.onIframeLoaded();\n },\n onTap: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(event.rect, boundingRect);\n const shiftedEvent = {\n id: event.id,\n group: event.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.page = new PageManager(window, iframe, pageListener);\n }\n setMessagePort(messagePort) {\n this.page.setMessagePort(messagePort);\n }\n setViewport(viewport, insets) {\n if (this.viewport == viewport && this.insets == insets) {\n return;\n }\n this.viewport = viewport;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n loadResource(url) {\n this.page.hide();\n this.page.loadPage(url);\n }\n onIframeLoaded() {\n if (!this.page.size) {\n // FIXME: raise error\n }\n else {\n this.layout();\n }\n }\n layout() {\n if (!this.page.size || !this.viewport) {\n return;\n }\n const margins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.page.setMargins(margins);\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, this.page.size, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(this.page.size.width)\n .setHeight(this.page.size.height)\n .build();\n this.scale = scale;\n this.page.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedSingleAreaBridge as FixedSingleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedSingleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedSingleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedSingleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst iframe = document.getElementById(\"page\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nwindow.singleArea = new FixedSingleAreaBridge(window, iframe, metaViewport, window.gestures, window.documentState);\nwindow.singleSelection = new FixedSingleSelectionBridge(iframe, window.singleSelectionListener);\nwindow.singleDecorations = new FixedSingleDecorationsBridge();\nwindow.singleInitialization = new FixedSingleInitializationBridge(window, window.fixedApiState, iframe, window.singleArea, window.singleSelection, window.singleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","onTap","event","stringify","offset","onLinkActivated","href","outerHtml","onDecorationActivated","stringOffset","stringRect","rect","id","group","onLayout","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","data","kind","onContentSizeAvailable","URL","_a","onIframeLoaded","ViewportStringBuilder","setInitialScale","scale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","offsetToParentCoordinates","iframeRect","visualViewport","offsetLeft","offsetTop","rectToParentCoordinates","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","SingleAreaManager","metaViewport","fit","insets","clientX","clientY","pageListener","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","page","setViewport","viewport","layout","setFit","loadResource","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","registerTemplates","templates","send","addDecoration","decoration","removeDecoration","postMessage","TrimDirection","ResolveDirection","selectionListener","onFeedback","requestSelection","requestId","clearSelection","feedback","onSelectionAvailable","selection","getElementById","querySelector","singleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","singleSelection","wrapperListener","adjustedSelection","selectionRect","selectedText","textBefore","textAfter","selectionAsJson","wrapper","singleSelectionListener","singleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","singleInitialization","areaBridge","selectionBridge","decorationsBridge","console","log","ports","onInitMessage","initMessage","initAreaManager","initSelection","initDecorations","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index 0957e3bd73..c0c22bb594 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?$(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?$(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),r)return new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter}).toRange();{const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}}(t.cssSelector,t.textQuote);if(!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){const e=this.requireContainer(),r=this.styles.get(t.decoration.style);if(!r)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const o=r,a=document.createElement("div");a.id=t.id,a.dataset.style=t.decoration.style,a.style.pointerEvents="none";const s=getComputedStyle(document.body).writingMode,c="vertical-rl"===s||"vertical-lr"===s,u=e.currentCSSZoom,l=document.scrollingElement,f=l.scrollLeft/u,p=l.scrollTop/u,y=c?window.innerHeight:window.innerWidth,h=c?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,g=(c?h:y)/d;function m(t,e,r,n){t.style.position="absolute";const i="vertical-rl"===n;if(i||"vertical-lr"===n){if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${e.height}px`,t.style.height=`${y}px`;const r=Math.floor(e.top/y)*y;i?t.style.right=-e.right-f+"px":t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}else if("bounds"===o.width)t.style.width=`${r.height}px`,t.style.height=`${y}px`,i?t.style.right=`${-r.right-f+l.clientWidth}px`:t.style.left=`${r.left+f}px`,t.style.top=`${r.top+p}px`;else if("page"===o.width){t.style.width=`${e.height}px`,t.style.height=`${g}px`;const r=Math.floor(e.top/g)*g;i?t.style.right=`${-e.right-f+l.clientWidth}px`:t.style.left=`${e.left+f}px`,t.style.top=`${r+p}px`}}else if("wrap"===o.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===o.width){t.style.width=`${y}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/y)*y;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===o.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===o.width){t.style.width=`${g}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/g)*g;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}const b=(w=t.range.getBoundingClientRect(),v=u,new DOMRect(w.x/v,w.y/v,w.width/v,w.height/v));var w,v;let x;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),x=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===o.layout){const e=!s.startsWith("vertical"),r=(S=t.range.startContainer).nodeType===Node.ELEMENT_NODE?S:S.parentElement,o=getComputedStyle(r).writingMode,c=i(t.range,e).map((t=>n(t,u))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of c){const e=x.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,b,s),a.append(e)}}else if("bounds"===o.layout){const t=x.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=s,m(t,b,b,s),a.append(t)}var S;e.append(a),t.container=a,t.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(a.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class M{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class ${constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?M(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?M(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,d=u?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,m=(u?d:h)/g;function b(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${m}px`;const r=Math.floor(e.top/m)*m;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${m}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/m)*m;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,b(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class ${constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index 2619586483..3cac44a9ce 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GAAK,EAEvCxB,EAAM,CACNK,EAAG,IAAIsB,YAAYF,EAAO,GAC1BlB,EAAG,IAAIoB,YAAYF,EAAO,GA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,cAAc,QACpCsN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B92B,KAAK6S,OAAOrK,SAAS0vB,KAAKpN,YAAYmN,EAAK,GAEnD,GFIsBplB,OAAQA,OAAOslB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n return anchor.toRange();\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(listener) {\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","quotedText","textBefore","textAfter","createRange","setStartBefore","setEndAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,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A,GACF,IAEG1L,QAAQ5hB,SAASqhB,KAAK,IAEnC,IEjCO,MACH,WAAAha,CAAYgD,EAAQwd,GAChBrwB,KAAK6S,OAASA,EACd7S,KAAKqwB,SAAWA,EAChBrwB,KAAKs3B,gBACLt3B,KAAKu3B,UACT,CACA,QAAAA,GACIv3B,KAAK6S,OAAO2kB,KAAO,IAAIzC,EAAqB/0B,KAAK6S,OAAOrK,UACxDxI,KAAKqwB,SAASoH,qBACd,MAAMC,EAAiB,IAAI9D,EAA0B/gB,OAAO8kB,SAAU9kB,OAAO+kB,mBACvEtH,EAAoB,IAAI9G,EAAkB3W,QAChD7S,KAAK6S,OAAOglB,WAAa,IAAInD,EAAU7hB,OAAOrK,UAC9CxI,KAAKqwB,SAASyH,oBACd93B,KAAK6S,OAAO2f,UAAY,IAAIiC,EAA0B5hB,OAAQ,IAAI+e,EAAiB/e,SACnF7S,KAAKqwB,SAAS0H,0BACd/3B,KAAK6S,OAAOmlB,YAAc,IAAI3E,EAA4BxgB,OAAQyd,GAClEtwB,KAAKqwB,SAAS4H,2BACd,IAAI7H,EAAiBvd,OAAQ6kB,EAAgBpH,GAC7C,IAAIe,EAAkBxe,OAAQ6kB,EAClC,CAEA,aAAAJ,GACIt3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMsO,EAAO1vB,SAASmiB,cAAc,QACpCuN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B/2B,KAAK6S,OAAOrK,SAAS2vB,KAAKrN,YAAYoN,EAAK,GAEnD,GFIsBrlB,OAAQA,OAAOulB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file From fde41ce012ca4d357668ad7109ea8596b2dcfa93 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 20 Jan 2026 02:56:41 +0100 Subject: [PATCH 36/56] Fix go method calls never resuming --- .../web/fixedlayout/FixedWebRendition.kt | 21 +++--- .../web/fixedlayout/FixedWebRenditionState.kt | 12 +++- .../reflowable/ReflowableWebRenditionState.kt | 70 ++++++++++++------- .../resource/ReflowableResourceState.kt | 11 +++ 4 files changed, 74 insertions(+), 40 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index aa61e0ed3a..b474a18814 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -49,7 +49,6 @@ import org.readium.navigator.web.fixedlayout.spread.FixedPagingLayoutInfo import org.readium.navigator.web.fixedlayout.spread.SingleSpreadState import org.readium.navigator.web.fixedlayout.spread.SingleViewportSpread import org.readium.navigator.web.fixedlayout.spread.SpreadNestedScrollConnection -import org.readium.navigator.web.fixedlayout.spread.SpreadScrollState import org.readium.navigator.web.internals.gestures.Scrollable2DDefaults import org.readium.navigator.web.internals.gestures.toFling2DBehavior import org.readium.navigator.web.internals.pager.RenditionPager @@ -113,15 +112,11 @@ public fun FixedWebRendition( val decorationListenerState = rememberUpdatedState(decorationListener) - val scrollStates = remember(state, state.layoutDelegate.layout.value) { - state.layoutDelegate.layout.value.spreads.map { SpreadScrollState() } - } - val flingBehavior = run { - val pagingLayoutInfo = remember(state, scrollStates, layoutDirection) { + val pagingLayoutInfo = remember(state, state.layoutDelegate.scrollStates, layoutDirection) { FixedPagingLayoutInfo( pagerState = state.pagerState, - pageStates = scrollStates, + pageStates = state.layoutDelegate.scrollStates.value, orientation = Orientation.Horizontal, direction = layoutDirection, density = density @@ -130,20 +125,20 @@ public fun FixedWebRendition( pagingFlingBehavior(pagingLayoutInfo) }.toFling2DBehavior(Orientation.Horizontal) - val scrollDispatcher = remember(state, scrollStates) { + val scrollDispatcher = remember(state, state.layoutDelegate.scrollStates.value) { RenditionScrollState( pagerState = state.pagerState, - pageStates = scrollStates, + pageStates = state.layoutDelegate.scrollStates.value, overflow = state.layoutDelegate.overflow ) } val spreadFlingBehavior = Scrollable2DDefaults.flingBehavior() - val spreadNestedScrollConnection = remember(state.pagerState, scrollStates) { + val spreadNestedScrollConnection = remember(state.pagerState, state.layoutDelegate.scrollStates.value) { SpreadNestedScrollConnection( pagerState = state.pagerState, - resourceStates = scrollStates, + resourceStates = state.layoutDelegate.scrollStates.value, flingBehavior = spreadFlingBehavior ) } @@ -215,7 +210,7 @@ public fun FixedWebRendition( actionModeCallback = textSelectionActionModeCallback, onSelectionApiChanged = { state.selectionDelegate.selectionApis[index] = it }, state = spreadState, - scrollState = scrollStates[index], + scrollState = state.layoutDelegate.scrollStates.value[index], backgroundColor = backgroundColor, decorationTemplates = state.decorationDelegate.decorationTemplates, decorations = decorations, @@ -260,7 +255,7 @@ public fun FixedWebRendition( actionModeCallback = textSelectionActionModeCallback, onSelectionApiChanged = { state.selectionDelegate.selectionApis[index] = it }, state = spreadState, - scrollState = scrollStates[index], + scrollState = state.layoutDelegate.scrollStates.value[index], backgroundColor = backgroundColor, decorationTemplates = state.decorationDelegate.decorationTemplates, decorations = decorations, diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 7b604a3da4..04dbfe16f1 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -21,6 +21,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap +import kotlin.coroutines.cancellation.CancellationException import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentMapOf @@ -43,6 +44,7 @@ import org.readium.navigator.web.fixedlayout.layout.LayoutResolver import org.readium.navigator.web.fixedlayout.layout.Page import org.readium.navigator.web.fixedlayout.layout.SingleViewportSpread import org.readium.navigator.web.fixedlayout.preferences.FixedWebSettings +import org.readium.navigator.web.fixedlayout.spread.SpreadScrollState import org.readium.navigator.web.internals.server.WebViewClient import org.readium.navigator.web.internals.server.WebViewServer import org.readium.navigator.web.internals.server.WebViewServer.Companion.assetsBaseHref @@ -213,6 +215,10 @@ internal class FixedLayoutDelegate( Layout(settings.readingProgression, newSpreads) } + val scrollStates: State> = derivedStateOf { + layout.value.spreads.map { SpreadScrollState() } + } + val fit: State = derivedStateOf { settings.fit } @@ -240,7 +246,7 @@ internal class FixedNavigationDelegate( } override suspend fun goTo(location: FixedWebGoLocation) { - pagerState.scroll(MutatePriority.PreventUserInput) { + pagerState.scroll(MutatePriority.UserInput) { val spreadIndex = lastMeasureInfo.value.layout.spreadIndexForHref(location.href) ?: return@scroll @@ -260,7 +266,7 @@ internal class FixedNavigationDelegate( override suspend fun moveForward() { if (pagerState.isScrollInProgress) { - return + throw CancellationException() } pagerState.scroll { @@ -272,7 +278,7 @@ internal class FixedNavigationDelegate( override suspend fun moveBackward() { if (pagerState.isScrollInProgress) { - return + throw CancellationException() } pagerState.scroll { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 0d19d4f65c..904038a47a 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -9,6 +9,7 @@ package org.readium.navigator.web.reflowable import android.app.Application +import androidx.compose.foundation.MutatePriority import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.MutableState @@ -21,6 +22,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.unit.DpSize +import kotlin.coroutines.cancellation.CancellationException import kotlin.coroutines.suspendCoroutine import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap @@ -268,18 +270,26 @@ internal class GoDelegate( ) { internal suspend fun goTo(location: ReflowableWebGoLocation) { withContext(Dispatchers.Main) { - val destIndex = readingOrder.indexOfHref(location.href) ?: return@withContext - val destLocationByResource = location.toResourceLocations(destIndex, readingOrder) - Timber.d("destByResource $destLocationByResource") - - pagerState.scrollToPage(destIndex) - - suspendCoroutine { continuation -> - resourceStates.zip(destLocationByResource).forEach { (state, location) -> - state.go( - location = location, - continuation = continuation.takeIf { state === resourceStates[destIndex] } - ) + pagerState.scroll(MutatePriority.UserInput) { + val destIndex = readingOrder.indexOfHref(location.href) ?: return@scroll + val destLocationByResource = location.toResourceLocations(destIndex, readingOrder) + Timber.d("destByResource $destLocationByResource") + + try { + pagerState.requestScrollToPage(destIndex) + + suspendCoroutine { continuation -> + resourceStates.zip(destLocationByResource).forEach { (state, location) -> + state.go( + location = location, + continuation = continuation.takeIf { state === resourceStates[destIndex] } + ) + } + } + } finally { + resourceStates.zip(destLocationByResource).forEach { (state, location) -> + state.cancelPendingLocation(location) + } } } } @@ -430,22 +440,34 @@ internal class ReflowableNavigationDelegate( } override suspend fun moveForward() { - val currentResourceState = resourceStates[pagerState.currentPage] - val scrollController = currentResourceState.scrollController.value ?: return - if (scrollController.canMoveForward()) { - scrollController.moveForward() - } else if (pagerState.currentPage < publication.readingOrder.items.size - 1) { - pagerState.scrollToPage(pagerState.currentPage + 1) + if (pagerState.isScrollInProgress) { + throw CancellationException() + } + + pagerState.scroll { + val currentResourceState = resourceStates[pagerState.currentPage] + val scrollController = currentResourceState.scrollController.value ?: return@scroll + if (scrollController.canMoveForward()) { + scrollController.moveForward() + } else if (pagerState.currentPage < publication.readingOrder.items.size - 1) { + pagerState.requestScrollToPage(pagerState.currentPage + 1) + } } } override suspend fun moveBackward() { - val currentResourceState = resourceStates[pagerState.currentPage] - val scrollController = currentResourceState.scrollController.value ?: return - if (scrollController.canMoveBackward()) { - scrollController.moveBackward() - } else if (pagerState.currentPage > 0) { - pagerState.scrollToPage(pagerState.currentPage - 1) + if (pagerState.isScrollInProgress) { + throw CancellationException() + } + + pagerState.scroll { + val currentResourceState = resourceStates[pagerState.currentPage] + val scrollController = currentResourceState.scrollController.value ?: return@scroll + if (scrollController.canMoveBackward()) { + scrollController.moveBackward() + } else if (pagerState.currentPage > 0) { + pagerState.requestScrollToPage(pagerState.currentPage - 1) + } } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt index 5e0cd3defe..d32aec669c 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResourceState.kt @@ -49,6 +49,17 @@ internal class ReflowableResourceState( pendingGoMutable = PendingGo(location, continuation) } + fun cancelPendingLocation( + location: ReflowableResourceLocation, + ) { + pendingGoMutable?.let { pendingGoMutable -> + if (pendingGoMutable.location == location) { + this.pendingGoMutable = null + pendingGoMutable.continuation?.resume(Unit) + } + } + } + fun acknowledgePendingLocation( location: ReflowableResourceLocation, orientation: Orientation, From 6412636b33442df7c1e6ac973d68d3d0faa76d21 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 20 Jan 2026 21:49:25 +0100 Subject: [PATCH 37/56] Revert moving scrollStates to state in FXL, fix inconsistent scroll dependencies state --- .../web/fixedlayout/FixedWebRendition.kt | 34 +++++++++++++------ .../web/fixedlayout/FixedWebRenditionState.kt | 10 +++--- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index b474a18814..cadc18c882 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -49,6 +49,7 @@ import org.readium.navigator.web.fixedlayout.spread.FixedPagingLayoutInfo import org.readium.navigator.web.fixedlayout.spread.SingleSpreadState import org.readium.navigator.web.fixedlayout.spread.SingleViewportSpread import org.readium.navigator.web.fixedlayout.spread.SpreadNestedScrollConnection +import org.readium.navigator.web.fixedlayout.spread.SpreadScrollState import org.readium.navigator.web.internals.gestures.Scrollable2DDefaults import org.readium.navigator.web.internals.gestures.toFling2DBehavior import org.readium.navigator.web.internals.pager.RenditionPager @@ -112,11 +113,15 @@ public fun FixedWebRendition( val decorationListenerState = rememberUpdatedState(decorationListener) + val scrollStates: List = remember(state.layoutDelegate.layout.value) { + state.layoutDelegate.layout.value.spreads.map { SpreadScrollState() } + } + val flingBehavior = run { - val pagingLayoutInfo = remember(state, state.layoutDelegate.scrollStates, layoutDirection) { + val pagingLayoutInfo = remember(state, scrollStates, layoutDirection) { FixedPagingLayoutInfo( pagerState = state.pagerState, - pageStates = state.layoutDelegate.scrollStates.value, + pageStates = scrollStates, orientation = Orientation.Horizontal, direction = layoutDirection, density = density @@ -125,24 +130,28 @@ public fun FixedWebRendition( pagingFlingBehavior(pagingLayoutInfo) }.toFling2DBehavior(Orientation.Horizontal) - val scrollDispatcher = remember(state, state.layoutDelegate.scrollStates.value) { + val scrollDispatcher = remember(state, scrollStates) { RenditionScrollState( pagerState = state.pagerState, - pageStates = state.layoutDelegate.scrollStates.value, + pageStates = scrollStates, overflow = state.layoutDelegate.overflow ) } val spreadFlingBehavior = Scrollable2DDefaults.flingBehavior() - val spreadNestedScrollConnection = remember(state.pagerState, state.layoutDelegate.scrollStates.value) { + val spreadNestedScrollConnection = remember(state.pagerState, scrollStates) { SpreadNestedScrollConnection( pagerState = state.pagerState, - resourceStates = state.layoutDelegate.scrollStates.value, + resourceStates = scrollStates, flingBehavior = spreadFlingBehavior ) } + // This is the layout used for computing scrollStates, flingBehavior, scrollDispatcher + // and spreadNestedScrollConnection so it should be used in page composition. + state.lastCompositionLayout = state.layoutDelegate.layout.value + LaunchedEffect(state.lastMeasureInfoState) { snapshotFlow { state.lastMeasureInfoState.value @@ -160,14 +169,19 @@ public fun FixedWebRendition( orientation = Orientation.Horizontal, beyondViewportPageCount = 2, enableScroll = true, - key = { index -> state.layoutDelegate.layout.value.spreads[index].pages.first().index }, + key = { index -> state.lastCompositionLayout.spreads[index].pages.first().index }, ) { index -> + + // Item composition is performed during the layout phase. Though state reading is + // tracked separately for each phase, recomposition and relayout can run + // concurrently after being triggered by the change of a state read in both phases.. + val initialProgression = when { index < state.pagerState.currentPage -> 1.0 else -> 0.0 } - val spread = state.layoutDelegate.layout.value.spreads[index] + val spread = state.lastCompositionLayout.spreads[index] val decorations = state.decorationDelegate.decorations .mapValues { groupDecorations -> @@ -210,7 +224,7 @@ public fun FixedWebRendition( actionModeCallback = textSelectionActionModeCallback, onSelectionApiChanged = { state.selectionDelegate.selectionApis[index] = it }, state = spreadState, - scrollState = state.layoutDelegate.scrollStates.value[index], + scrollState = scrollStates[index], backgroundColor = backgroundColor, decorationTemplates = state.decorationDelegate.decorationTemplates, decorations = decorations, @@ -255,7 +269,7 @@ public fun FixedWebRendition( actionModeCallback = textSelectionActionModeCallback, onSelectionApiChanged = { state.selectionDelegate.selectionApis[index] = it }, state = spreadState, - scrollState = state.layoutDelegate.scrollStates.value[index], + scrollState = scrollStates[index], backgroundColor = backgroundColor, decorationTemplates = state.decorationDelegate.decorationTemplates, decorations = decorations, diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 04dbfe16f1..f6b369a0b0 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -44,7 +44,6 @@ import org.readium.navigator.web.fixedlayout.layout.LayoutResolver import org.readium.navigator.web.fixedlayout.layout.Page import org.readium.navigator.web.fixedlayout.layout.SingleViewportSpread import org.readium.navigator.web.fixedlayout.preferences.FixedWebSettings -import org.readium.navigator.web.fixedlayout.spread.SpreadScrollState import org.readium.navigator.web.internals.server.WebViewClient import org.readium.navigator.web.internals.server.WebViewServer import org.readium.navigator.web.internals.server.WebViewServer.Companion.assetsBaseHref @@ -105,10 +104,13 @@ public class FixedWebRenditionState internal constructor( .spreadIndexForHref(initialLocation.href) ?: 0 + internal var lastCompositionLayout: Layout = + layoutDelegate.layout.value + internal val pagerState: PagerState = PagerState( currentPage = initialSpread, - pageCount = { layoutDelegate.layout.value.spreads.size } + pageCount = { lastCompositionLayout.spreads.size } ) internal val selectionDelegate: FixedSelectionDelegate = @@ -215,10 +217,6 @@ internal class FixedLayoutDelegate( Layout(settings.readingProgression, newSpreads) } - val scrollStates: State> = derivedStateOf { - layout.value.spreads.map { SpreadScrollState() } - } - val fit: State = derivedStateOf { settings.fit } From e7cc507d609cc386a63d25a49c08ac2cf912360d Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 21 Jan 2026 17:58:05 +0100 Subject: [PATCH 38/56] New attempt to fix the crash --- .../web/fixedlayout/FixedWebRendition.kt | 21 ++++++-------- .../web/fixedlayout/FixedWebRenditionState.kt | 28 ++++++++++--------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index cadc18c882..a917998f40 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -113,8 +113,12 @@ public fun FixedWebRendition( val decorationListenerState = rememberUpdatedState(decorationListener) - val scrollStates: List = remember(state.layoutDelegate.layout.value) { - state.layoutDelegate.layout.value.spreads.map { SpreadScrollState() } + LaunchedEffect(state.modelLayout.value) { + state.uiLayout = state.modelLayout.value + } + + val scrollStates: List = remember(state.uiLayout) { + state.uiLayout.spreads.map { SpreadScrollState() } } val flingBehavior = run { @@ -148,10 +152,6 @@ public fun FixedWebRendition( ) } - // This is the layout used for computing scrollStates, flingBehavior, scrollDispatcher - // and spreadNestedScrollConnection so it should be used in page composition. - state.lastCompositionLayout = state.layoutDelegate.layout.value - LaunchedEffect(state.lastMeasureInfoState) { snapshotFlow { state.lastMeasureInfoState.value @@ -169,19 +169,14 @@ public fun FixedWebRendition( orientation = Orientation.Horizontal, beyondViewportPageCount = 2, enableScroll = true, - key = { index -> state.lastCompositionLayout.spreads[index].pages.first().index }, + key = { index -> state.uiLayout.spreads[index].pages.first().index }, ) { index -> - - // Item composition is performed during the layout phase. Though state reading is - // tracked separately for each phase, recomposition and relayout can run - // concurrently after being triggered by the change of a state read in both phases.. - val initialProgression = when { index < state.pagerState.currentPage -> 1.0 else -> 0.0 } - val spread = state.lastCompositionLayout.spreads[index] + val spread = state.uiLayout.spreads[index] val decorations = state.decorationDelegate.decorations .mapValues { groupDecorations -> diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index f6b369a0b0..9c6d9f619c 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -86,33 +86,35 @@ public class FixedWebRenditionState internal constructor( override val controller: FixedWebRenditionController? by controllerState - internal val lastMeasureInfoState: State = derivedStateOf { - FixedLayoutMeasureInfo( - currentSpread = pagerState.currentPage, - layout = Snapshot.withoutReadObservation { layoutDelegate.layout.value } - ) - } - internal val layoutDelegate: FixedLayoutDelegate = FixedLayoutDelegate( publication.readingOrder, initialSettings ) + internal val modelLayout: State = + layoutDelegate.modelLayout + + internal var uiLayout: Layout by mutableStateOf(modelLayout.value) + private val initialSpread: Int = - layoutDelegate.layout.value + modelLayout.value .spreadIndexForHref(initialLocation.href) ?: 0 - internal var lastCompositionLayout: Layout = - layoutDelegate.layout.value - internal val pagerState: PagerState = PagerState( currentPage = initialSpread, - pageCount = { lastCompositionLayout.spreads.size } + pageCount = { uiLayout.spreads.size } ) + internal val lastMeasureInfoState: State = derivedStateOf { + FixedLayoutMeasureInfo( + currentSpread = pagerState.currentPage, + layout = Snapshot.withoutReadObservation { uiLayout } + ) + } + internal val selectionDelegate: FixedSelectionDelegate = FixedSelectionDelegate( lastMeasureInfoState = lastMeasureInfoState @@ -212,7 +214,7 @@ internal class FixedLayoutDelegate( } } - val layout: State = derivedStateOf { + val modelLayout: State = derivedStateOf { val newSpreads = layoutResolver.layout(settings) Layout(settings.readingProgression, newSpreads) } From f32985895812213e0949e0355ced435b25c6a295 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 21 Jan 2026 18:28:41 +0100 Subject: [PATCH 39/56] Fix --- .../navigator/web/fixedlayout/FixedWebRendition.kt | 8 ++++---- .../web/fixedlayout/FixedWebRenditionState.kt | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index a917998f40..38f3c496ec 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -113,10 +113,6 @@ public fun FixedWebRendition( val decorationListenerState = rememberUpdatedState(decorationListener) - LaunchedEffect(state.modelLayout.value) { - state.uiLayout = state.modelLayout.value - } - val scrollStates: List = remember(state.uiLayout) { state.uiLayout.spreads.map { SpreadScrollState() } } @@ -152,6 +148,10 @@ public fun FixedWebRendition( ) } + LaunchedEffect(state.layoutDelegate.layout.value) { + state.uiLayout = state.layoutDelegate.layout.value + } + LaunchedEffect(state.lastMeasureInfoState) { snapshotFlow { state.lastMeasureInfoState.value diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 9c6d9f619c..9e76d8e891 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -19,7 +19,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateMapOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap import kotlin.coroutines.cancellation.CancellationException import kotlinx.collections.immutable.PersistentList @@ -92,13 +91,10 @@ public class FixedWebRenditionState internal constructor( initialSettings ) - internal val modelLayout: State = - layoutDelegate.modelLayout - - internal var uiLayout: Layout by mutableStateOf(modelLayout.value) + internal var uiLayout: Layout by mutableStateOf(layoutDelegate.layout.value) private val initialSpread: Int = - modelLayout.value + layoutDelegate.layout.value .spreadIndexForHref(initialLocation.href) ?: 0 @@ -111,7 +107,7 @@ public class FixedWebRenditionState internal constructor( internal val lastMeasureInfoState: State = derivedStateOf { FixedLayoutMeasureInfo( currentSpread = pagerState.currentPage, - layout = Snapshot.withoutReadObservation { uiLayout } + layout = uiLayout ) } @@ -214,7 +210,7 @@ internal class FixedLayoutDelegate( } } - val modelLayout: State = derivedStateOf { + val layout: State = derivedStateOf { val newSpreads = layoutResolver.layout(settings) Layout(settings.readingProgression, newSpreads) } From 36626fb29b3a9ffc573dea76f534eba2fa5515d1 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Thu, 22 Jan 2026 12:38:02 +0100 Subject: [PATCH 40/56] Recreate pagerState when spreads setting changes. --- .../web/fixedlayout/FixedWebRendition.kt | 101 ++++++++-------- .../web/fixedlayout/FixedWebRenditionState.kt | 110 +++++++++++------- 2 files changed, 117 insertions(+), 94 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt index 38f3c496ec..b7e173d34b 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRendition.kt @@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.displayCutout import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.LaunchedEffect @@ -42,6 +43,7 @@ import org.readium.navigator.common.defaultDecorationListener import org.readium.navigator.common.defaultHyperlinkListener import org.readium.navigator.common.defaultInputListener import org.readium.navigator.web.fixedlayout.layout.DoubleViewportSpread +import org.readium.navigator.web.fixedlayout.layout.Layout import org.readium.navigator.web.fixedlayout.layout.SingleViewportSpread import org.readium.navigator.web.fixedlayout.spread.DoubleSpreadState import org.readium.navigator.web.fixedlayout.spread.DoubleViewportSpread @@ -87,52 +89,58 @@ public fun FixedWebRendition( modifier = modifier.fillMaxSize(), propagateMinConstraints = true ) { - val layoutDirection = - state.layoutDelegate.overflow.value.readingProgression.toLayoutDirection() + val density = LocalDensity.current - CompositionLocalProvider(LocalLayoutDirection provides layoutDirection) { - if (state.controller == null) { - val currentLocation = currentLocation(state.lastMeasureInfoState.value, state.publication) - state.initController(location = currentLocation) - } + val coroutineScope = rememberCoroutineScope() - val density = LocalDensity.current + val pagerStateNow = state.pagerState.value - val coroutineScope = rememberCoroutineScope() + val layoutNow = state.layoutDelegate.layout.value - val displayArea = rememberUpdatedState( - DisplayArea( - viewportSize = DpSize(maxWidth, maxHeight), - safeDrawingPadding = windowInsets.asAbsolutePaddingValues() - ) + val selectionDelegateNow = state.selectionDelegate + + val layoutDirectionNow = + state.layoutDelegate.overflow.value.readingProgression.toLayoutDirection() + + val displayArea = rememberUpdatedState( + DisplayArea( + viewportSize = DpSize(maxWidth, maxHeight), + safeDrawingPadding = windowInsets.asAbsolutePaddingValues() ) + ) - val inputListenerState = rememberUpdatedState(inputListener) + val inputListenerState = rememberUpdatedState(inputListener) - val hyperlinkListenerState = rememberUpdatedState(hyperlinkListener) + val hyperlinkListenerState = rememberUpdatedState(hyperlinkListener) - val decorationListenerState = rememberUpdatedState(decorationListener) + val decorationListenerState = rememberUpdatedState(decorationListener) - val scrollStates: List = remember(state.uiLayout) { - state.uiLayout.spreads.map { SpreadScrollState() } + CompositionLocalProvider(LocalLayoutDirection provides layoutDirectionNow) { + if (state.controller == null) { + val currentLocation = currentLocation(layoutNow, pagerStateNow, state.publication) + state.initController(location = currentLocation) + } + + val scrollStates: List = remember(layoutNow) { + layoutNow.spreads.map { SpreadScrollState() } } val flingBehavior = run { - val pagingLayoutInfo = remember(state, scrollStates, layoutDirection) { + val pagingLayoutInfo = remember(density, pagerStateNow, scrollStates, layoutDirectionNow) { FixedPagingLayoutInfo( - pagerState = state.pagerState, + pagerState = pagerStateNow, pageStates = scrollStates, orientation = Orientation.Horizontal, - direction = layoutDirection, + direction = layoutDirectionNow, density = density ) } pagingFlingBehavior(pagingLayoutInfo) }.toFling2DBehavior(Orientation.Horizontal) - val scrollDispatcher = remember(state, scrollStates) { + val scrollDispatcher = remember(state, pagerStateNow, scrollStates) { RenditionScrollState( - pagerState = state.pagerState, + pagerState = pagerStateNow, pageStates = scrollStates, overflow = state.layoutDelegate.overflow ) @@ -140,43 +148,38 @@ public fun FixedWebRendition( val spreadFlingBehavior = Scrollable2DDefaults.flingBehavior() - val spreadNestedScrollConnection = remember(state.pagerState, scrollStates) { + val spreadNestedScrollConnection = remember(pagerStateNow, scrollStates) { SpreadNestedScrollConnection( - pagerState = state.pagerState, + pagerState = pagerStateNow, resourceStates = scrollStates, flingBehavior = spreadFlingBehavior ) } - LaunchedEffect(state.layoutDelegate.layout.value) { - state.uiLayout = state.layoutDelegate.layout.value - } - - LaunchedEffect(state.lastMeasureInfoState) { + LaunchedEffect(pagerStateNow, layoutNow) { snapshotFlow { - state.lastMeasureInfoState.value + pagerStateNow.currentPage }.onEach { - val currentLocation = currentLocation(it, state.publication) + val currentLocation = currentLocation(layoutNow, pagerStateNow, state.publication) state.navigationDelegate.updateLocation(currentLocation) }.launchIn(this) } RenditionPager( modifier = Modifier.nestedScroll(spreadNestedScrollConnection), - state = state.pagerState, + state = pagerStateNow, scrollState = scrollDispatcher, flingBehavior = flingBehavior, orientation = Orientation.Horizontal, beyondViewportPageCount = 2, - enableScroll = true, - key = { index -> state.uiLayout.spreads[index].pages.first().index }, + enableScroll = true ) { index -> val initialProgression = when { - index < state.pagerState.currentPage -> 1.0 + index < pagerStateNow.currentPage -> 1.0 else -> 0.0 } - val spread = state.uiLayout.spreads[index] + val spread = layoutNow.spreads[index] val decorations = state.decorationDelegate.decorations .mapValues { groupDecorations -> @@ -197,9 +200,9 @@ public fun FixedWebRendition( ) SingleViewportSpread( - pagerState = state.pagerState, + pagerState = pagerStateNow, progression = initialProgression, - layoutDirection = layoutDirection, + layoutDirection = layoutDirectionNow, onTap = { inputListenerState.value.onTap( it, @@ -217,7 +220,7 @@ public fun FixedWebRendition( } }, actionModeCallback = textSelectionActionModeCallback, - onSelectionApiChanged = { state.selectionDelegate.selectionApis[index] = it }, + onSelectionApiChanged = { selectionDelegateNow.selectionApis[index] = it }, state = spreadState, scrollState = scrollStates[index], backgroundColor = backgroundColor, @@ -242,9 +245,9 @@ public fun FixedWebRendition( ) DoubleViewportSpread( - pagerState = state.pagerState, + pagerState = pagerStateNow, progression = initialProgression, - layoutDirection = layoutDirection, + layoutDirection = layoutDirectionNow, onTap = { inputListenerState.value.onTap( it, @@ -262,7 +265,7 @@ public fun FixedWebRendition( } }, actionModeCallback = textSelectionActionModeCallback, - onSelectionApiChanged = { state.selectionDelegate.selectionApis[index] = it }, + onSelectionApiChanged = { selectionDelegateNow.selectionApis[index] = it }, state = spreadState, scrollState = scrollStates[index], backgroundColor = backgroundColor, @@ -280,16 +283,16 @@ public fun FixedWebRendition( } private fun currentLocation( - lastMeasureInfo: FixedLayoutMeasureInfo, + layout: Layout, + pagerState: PagerState, publication: FixedWebPublication, ): FixedWebLocation { - val currentSpreadIndex = lastMeasureInfo.currentSpread - val currentLayout = lastMeasureInfo.layout - val itemIndex = currentLayout.pageIndexForSpread(currentSpreadIndex) + val currentSpreadIndex = pagerState.currentPage + val itemIndex = layout.pageIndexForSpread(currentSpreadIndex) val href = publication.readingOrder[itemIndex].href val mediaType = publication.readingOrder[itemIndex].mediaType val position = Position(itemIndex + 1)!! - val totalProgression = Progression(currentSpreadIndex / currentLayout.spreads.size.toDouble())!! + val totalProgression = Progression(currentSpreadIndex / layout.spreads.size.toDouble())!! return FixedWebLocation(href, position, totalProgression, mediaType) } diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 9e76d8e891..1eedacf5ea 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -19,6 +19,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateMapOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap import kotlin.coroutines.cancellation.CancellationException import kotlinx.collections.immutable.PersistentList @@ -47,6 +48,9 @@ import org.readium.navigator.web.internals.server.WebViewClient import org.readium.navigator.web.internals.server.WebViewServer import org.readium.navigator.web.internals.server.WebViewServer.Companion.assetsBaseHref import org.readium.navigator.web.internals.util.HyperlinkProcessor +import org.readium.navigator.web.internals.util.MutableRef +import org.readium.navigator.web.internals.util.getValue +import org.readium.navigator.web.internals.util.setValue import org.readium.navigator.web.internals.webapi.Decoration as WebApiDecoration import org.readium.navigator.web.internals.webapi.FixedDoubleSelectionApi import org.readium.navigator.web.internals.webapi.FixedSelectionApi @@ -91,30 +95,44 @@ public class FixedWebRenditionState internal constructor( initialSettings ) - internal var uiLayout: Layout by mutableStateOf(layoutDelegate.layout.value) - - private val initialSpread: Int = - layoutDelegate.layout.value - .spreadIndexForHref(initialLocation.href) - ?: 0 - - internal val pagerState: PagerState = - PagerState( - currentPage = initialSpread, - pageCount = { uiLayout.spreads.size } - ) - - internal val lastMeasureInfoState: State = derivedStateOf { - FixedLayoutMeasureInfo( - currentSpread = pagerState.currentPage, - layout = uiLayout - ) + /* + * We need to get a fresh pagerState when the layout changes because of pagerState.pageCount. + * Let's assume we don't. + * After a state change affecting both (a layout change), pager items can be laid out again + * at the same time as the pager parent is recomposed. In that case, it's using stale values + * from previous composition. So when we get currentPage, we have no idea if it's referring to + * the old layout or the up to date one. + */ + internal val pagerState: State = run { + var holder by MutableRef?>(null) + + derivedStateOf { + val oldLayoutAndPagerState = holder + val newLayout = layoutDelegate.layout.value + val newCurrentSpread = if (oldLayoutAndPagerState == null) { + newLayout.spreadIndexForHref(initialLocation.href) ?: 0 + } else { + val oldCurrentSpread = Snapshot.withoutReadObservation { oldLayoutAndPagerState.second.currentPage } + val currentPages = oldLayoutAndPagerState.first.spreads[oldCurrentSpread].pages + val currentHref = currentPages.first().href + newLayout.spreadIndexForHref(currentHref)!! + } + val newPagerState = PagerState( + currentPage = newCurrentSpread, + pageCount = { newLayout.spreads.size } + ) + holder = newLayout to newPagerState + newPagerState + } } - internal val selectionDelegate: FixedSelectionDelegate = - FixedSelectionDelegate( - lastMeasureInfoState = lastMeasureInfoState - ) + internal val selectionDelegate: FixedSelectionDelegate by + derivedStateOf { + FixedSelectionDelegate( + pagerState.value, + layoutDelegate.layout.value + ) + } internal val decorationDelegate: FixedDecorationDelegate = FixedDecorationDelegate(configuration.decorationTemplates) @@ -152,7 +170,7 @@ public class FixedWebRenditionState internal constructor( navigationDelegate = FixedNavigationDelegate( pagerState, - lastMeasureInfoState, + layoutDelegate.layout, layoutDelegate.overflow, location ) @@ -185,11 +203,6 @@ internal data class FixedWebPreloadedData( val fixedDoubleContent: String, ) -internal class FixedLayoutMeasureInfo( - val currentSpread: Int, - val layout: Layout, -) - internal class FixedLayoutDelegate( readingOrder: FixedWebPublication.ReadingOrder, initialSettings: FixedWebSettings, @@ -221,8 +234,8 @@ internal class FixedLayoutDelegate( } internal class FixedNavigationDelegate( - private val pagerState: PagerState, - private val lastMeasureInfo: State, + private val pagerState: State, + private val layout: State, overflowState: State, initialLocation: FixedWebLocation, ) : NavigationController, OverflowController { @@ -242,11 +255,13 @@ internal class FixedNavigationDelegate( } override suspend fun goTo(location: FixedWebGoLocation) { - pagerState.scroll(MutatePriority.UserInput) { - val spreadIndex = lastMeasureInfo.value.layout.spreadIndexForHref(location.href) + val pagerStateNow = pagerState.value + + pagerStateNow.scroll(MutatePriority.UserInput) { + val spreadIndex = layout.value.spreadIndexForHref(location.href) ?: return@scroll - pagerState.requestScrollToPage(spreadIndex) + pagerStateNow.requestScrollToPage(spreadIndex) } } @@ -255,31 +270,35 @@ internal class FixedNavigationDelegate( } override val canMoveForward: Boolean - get() = lastMeasureInfo.value.currentSpread < lastMeasureInfo.value.layout.spreads.size - 1 + get() = pagerState.value.currentPage < layout.value.spreads.size - 1 override val canMoveBackward: Boolean - get() = lastMeasureInfo.value.currentSpread > 0 + get() = pagerState.value.currentPage > 0 override suspend fun moveForward() { - if (pagerState.isScrollInProgress) { + val pagerStateNow = pagerState.value + + if (pagerStateNow.isScrollInProgress) { throw CancellationException() } - pagerState.scroll { + pagerStateNow.scroll { if (canMoveForward) { - pagerState.requestScrollToPage(pagerState.currentPage + 1) + pagerStateNow.requestScrollToPage(pagerStateNow.currentPage + 1) } } } override suspend fun moveBackward() { - if (pagerState.isScrollInProgress) { + val pagerStateNow = pagerState.value + + if (pagerStateNow.isScrollInProgress) { throw CancellationException() } - pagerState.scroll { + pagerStateNow.scroll { if (canMoveBackward) { - pagerState.requestScrollToPage(pagerState.currentPage - 1) + pagerStateNow.requestScrollToPage(pagerStateNow.currentPage - 1) } } } @@ -294,18 +313,19 @@ internal class FixedDecorationDelegate( } internal class FixedSelectionDelegate( - private val lastMeasureInfoState: State, + private val pagerState: PagerState, + private val layout: Layout, ) : SelectionController { val selectionApis: SnapshotStateMap = mutableStateMapOf() override suspend fun currentSelection(): Selection? { - val lastMeasureInfoNow = lastMeasureInfoState.value - val currentSpreadNow = lastMeasureInfoNow.currentSpread + val currentSpreadNow = pagerState.currentPage + // FIXME: resume coroutines when we get a new instance. Maybe in Resource composable. val (page, selection) = selectionApis[currentSpreadNow] - ?.getCurrentSelection(currentSpreadNow, lastMeasureInfoNow.layout) + ?.getCurrentSelection(currentSpreadNow, layout) ?: return null return Selection( From c82af322a646558525a810c7dcdb6f8a73a11a75 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 23 Jan 2026 14:32:44 +0100 Subject: [PATCH 41/56] Do not call both onTap and onLinkActivated --- .../navigators/web/internals/scripts/src/common/gestures.ts | 4 ++-- .../navigator/web/internals/generated/fixed-double-script.js | 2 +- .../web/internals/generated/fixed-double-script.js.map | 2 +- .../web/internals/generated/fixed-injectable-script.js | 2 +- .../web/internals/generated/fixed-injectable-script.js.map | 2 +- .../navigator/web/internals/generated/fixed-single-script.js | 2 +- .../web/internals/generated/fixed-single-script.js.map | 2 +- .../web/internals/generated/reflowable-injectable-script.js | 2 +- .../internals/generated/reflowable-injectable-script.js.map | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/readium/navigators/web/internals/scripts/src/common/gestures.ts b/readium/navigators/web/internals/scripts/src/common/gestures.ts index 7ebd59c7fb..e36595308d 100644 --- a/readium/navigators/web/internals/scripts/src/common/gestures.ts +++ b/readium/navigators/web/internals/scripts/src/common/gestures.ts @@ -52,9 +52,9 @@ export class GesturesDetector { event.stopPropagation() event.preventDefault() - } else { - return } + + return } let decorationActivatedEvent: DecorationActivatedEvent | null diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js index 7b8fdf381f..a0ab419f56 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js @@ -1,2 +1,2 @@ -!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=P(t,0,1),r=P(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],x(r,A([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(d[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,A=RegExp.prototype.test,x=Array.prototype.concat,j=Array.prototype.join,P=Array.prototype.slice,O=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||A.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-O(-t):O(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var C=r(7002),W=C.custom,B=_(W)?W:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==q(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==q(t)||D&&"object"==typeof t&&D in t)}function _(t){if(M)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(G(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?k(e,w):w}if("bigint"==typeof e){var A=String(e)+"n";return g?k(e,A):A}var O=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=O&&O>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var I,W=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function z(e,r,i){if(r&&(o=P.call(o)).push(r),i){var a={depth:s.depth};return G(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,z);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=M?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||M?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(U(e)){if(0===e.length)return"[]";var it=Z(e,z);return W&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,W)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,z);return"cause"in Error.prototype||!("cause"in e)||T.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(x.call("[cause]: "+z(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(B&&"function"==typeof e[B]&&C)return C(e,{depth:O-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(z(r,e,!0)+" => "+z(t,e))})),Y("Map",i.call(e),st,W)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(z(t,e))})),Y("Set",c.call(e),ut,W)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(z(E.call(e)));if(function(t){return!("[object Boolean]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(String(e)));if(!function(t){return!("[object Date]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,z),lt=F?F(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(q(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(x.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":W?yt+"{"+Q(ct,W)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function q(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=U(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(d,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof v&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return u(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return b.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}function e(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function n(t,r){const n={x:t.left,y:t.top},o={x:t.right,y:t.bottom},i=e(n,r),a=e(o,r);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class o{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(r,o,a,s,u){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.listener=u,new i(r,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};u.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}});const c={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=o.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=o.getBoundingClientRect(),i=e(t.offset,r),a=n(t.rect,r),s={id:t.id,group:t.group,rect:a,offset:i};u.onDecorationActivated(s)}},l={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=a.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=a.getBoundingClientRect(),o=e(t.offset,r),i=n(t.rect,r),s={id:t.id,group:t.group,rect:i,offset:o};u.onDecorationActivated(s)}};this.leftPage=new t(r,o,c),this.rightPage=new t(r,a,l),this.metaViewport=s}setLeftMessagePort(t){this.leftPage.setMessagePort(t)}setRightMessagePort(t){this.rightPage.setMessagePort(t)}loadSpread(t){this.leftPage.hide(),this.rightPage.hide(),this.spread=t,t.left&&this.leftPage.loadPage(t.left),t.right&&this.rightPage.loadPage(t.right)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}layout(){if(!this.viewport||!this.leftPage.size&&this.spread.left||!this.rightPage.size&&this.spread.right)return;const t={top:this.insets.top,right:0,bottom:this.insets.bottom,left:this.insets.left};this.leftPage.setMargins(t);const e={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:0};this.rightPage.setMargins(e),this.spread.right?this.spread.left||this.leftPage.setPlaceholder(this.rightPage.size):this.rightPage.setPlaceholder(this.leftPage.size);const r=this.leftPage.size.width+this.rightPage.size.width,n=Math.max(this.leftPage.size.height,this.rightPage.size.height),i={width:r,height:n},a={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},s=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,i,a);this.metaViewport.content=(new o).setInitialScale(s).setMinimumScale(s).setWidth(r).setHeight(n).build(),this.leftPage.show(),this.rightPage.show(),this.listener.onLayout()}}class s{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);function f(t,e){const r=e.getBoundingClientRect(),o=n(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:o,textBefore:t.textBefore,textAfter:t.textAfter}}r.n(l)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}class y{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const h=document.getElementById("page-left"),g=document.getElementById("page-right"),d=document.querySelector("meta[name=viewport]");Window.prototype.doubleArea=new class{constructor(t,e,r,n,o,i){const u=new s(t,o,i);this.manager=new a(t,e,r,n,u)}setLeftMessagePort(t){this.manager.setLeftMessagePort(t)}setRightMessagePort(t){this.manager.setRightMessagePort(t)}loadSpread(t){this.manager.loadSpread(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,h,g,d,window.gestures,window.documentState),window.doubleSelection=new class{constructor(t,e,r){this.requestStates=new Map,this.isLeftInitialized=!1,this.isRightInitialized=!1,this.leftIframe=t,this.rightIframe=e,this.listener=r;const n={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.leftIframe);this.onSelectionAvailable(t,"left",r)}else this.onSelectionAvailable(t,"left",e)}};this.leftWrapper=new p(n);const o={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.rightIframe);this.onSelectionAvailable(t,"right",r)}else this.onSelectionAvailable(t,"right",e)}};this.rightWrapper=new p(o)}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t),this.isLeftInitialized=!0}setRightMessagePort(t){this.rightWrapper.setMessagePort(t),this.isRightInitialized=!0}requestSelection(t){this.isLeftInitialized&&this.isRightInitialized?(this.requestStates.set(t,"pending"),this.leftWrapper.requestSelection(t),this.rightWrapper.requestSelection(t)):this.isLeftInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.leftWrapper.requestSelection(t)):this.isRightInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.rightWrapper.requestSelection(t)):(this.requestStates.set(t,"firstResponseWasNull"),this.onSelectionAvailable(t,"left",null))}clearSelection(){this.leftWrapper.clearSelection(),this.rightWrapper.clearSelection()}onSelectionAvailable(t,e,r){const n=this.requestStates.get(t);if(!n)return;if(!r&&"pending"===n)return void this.requestStates.set(t,"firstResponseWasNull");this.requestStates.delete(t);const o=JSON.stringify(r);this.listener.onSelectionAvailable(t,e,o)}}(h,g,window.doubleSelectionListener),window.doubleDecorations=new class{constructor(){this.leftWrapper=new y,this.rightWrapper=new y}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t)}setRightMessagePort(t){this.rightWrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.leftWrapper.registerTemplates(e),this.rightWrapper.registerTemplates(e)}addDecoration(t,e,r){const n=function(t){return JSON.parse(t)}(t);switch(e){case"left":this.leftWrapper.addDecoration(n,r);break;case"right":this.rightWrapper.addDecoration(n,r);break;default:throw Error(`Unknown iframe type: ${e}`)}}removeDecoration(t,e){this.leftWrapper.removeDecoration(t,e),this.rightWrapper.removeDecoration(t,e)}},window.doubleInitialization=new class{constructor(t,e,r,n,o,i,a){this.areaReadySemaphore=2,this.selectionReadySemaphore=2,this.decorationReadySemaphore=2,this.listener=e,this.areaBridge=o,this.selectionBridge=i,this.decorationsBridge=a,t.addEventListener("message",(t=>{t.ports[0]&&(t.source===r.contentWindow?this.onInitMessageLeft(t):t.source==n.contentWindow&&this.onInitMessageRight(t))}))}loadSpread(t){const e=(t.left?1:0)+(t.right?1:0);this.areaReadySemaphore=e,this.selectionReadySemaphore=e,this.decorationReadySemaphore=e,this.areaBridge.loadSpread(t)}onInitMessageLeft(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setLeftMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setLeftMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setLeftMessagePort(r),this.onInitDecorationMessage()}}onInitMessageRight(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setRightMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setRightMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setRightMessagePort(r),this.onInitDecorationMessage()}}onInitAreaMessage(){this.areaReadySemaphore-=1,0==this.areaReadySemaphore&&this.listener.onAreaApiAvailable()}onInitSelectionMessage(){this.selectionReadySemaphore-=1,0==this.selectionReadySemaphore&&this.listener.onSelectionApiAvailable()}onInitDecorationMessage(){this.decorationReadySemaphore-=1,0==this.decorationReadySemaphore&&this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,h,g,window.doubleArea,window.doubleSelection,window.doubleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); +!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=P(t,0,1),r=P(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],x(r,A([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(d[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,A=RegExp.prototype.test,x=Array.prototype.concat,j=Array.prototype.join,P=Array.prototype.slice,O=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||A.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-O(-t):O(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var C=r(7002),W=C.custom,B=_(W)?W:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==q(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==q(t)||D&&"object"==typeof t&&D in t)}function _(t){if(M)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(G(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?k(e,w):w}if("bigint"==typeof e){var A=String(e)+"n";return g?k(e,A):A}var O=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=O&&O>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var I,W=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function z(e,r,i){if(r&&(o=P.call(o)).push(r),i){var a={depth:s.depth};return G(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,z);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=M?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||M?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(U(e)){if(0===e.length)return"[]";var it=Z(e,z);return W&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,W)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,z);return"cause"in Error.prototype||!("cause"in e)||T.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(x.call("[cause]: "+z(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(B&&"function"==typeof e[B]&&C)return C(e,{depth:O-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(z(r,e,!0)+" => "+z(t,e))})),Y("Map",i.call(e),st,W)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(z(t,e))})),Y("Set",c.call(e),ut,W)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(z(E.call(e)));if(function(t){return!("[object Boolean]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==q(t)||D&&"object"==typeof t&&D in t)}(e))return K(z(String(e)));if(!function(t){return!("[object Date]"!==q(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,z),lt=F?F(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(q(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(x.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":W?yt+"{"+Q(ct,W)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function q(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=U(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(d,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof v&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return u(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return b.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}function e(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function n(t,r){const n={x:t.left,y:t.top},o={x:t.right,y:t.bottom},i=e(n,r),a=e(o,r);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class o{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}class i{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e?e instanceof HTMLAnchorElement&&(this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()):(r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t))}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class a{constructor(r,o,a,s,u){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.listener=u,new i(r,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};u.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}});const c={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=o.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=o.getBoundingClientRect(),i=e(t.offset,r),a=n(t.rect,r),s={id:t.id,group:t.group,rect:a,offset:i};u.onDecorationActivated(s)}},l={onIframeLoaded:()=>{this.layout()},onTap:t=>{const r=a.getBoundingClientRect(),n=e(t.offset,r);u.onTap({offset:n})},onLinkActivated:(t,e)=>{u.onLinkActivated(t,e)},onDecorationActivated:t=>{const r=a.getBoundingClientRect(),o=e(t.offset,r),i=n(t.rect,r),s={id:t.id,group:t.group,rect:i,offset:o};u.onDecorationActivated(s)}};this.leftPage=new t(r,o,c),this.rightPage=new t(r,a,l),this.metaViewport=s}setLeftMessagePort(t){this.leftPage.setMessagePort(t)}setRightMessagePort(t){this.rightPage.setMessagePort(t)}loadSpread(t){this.leftPage.hide(),this.rightPage.hide(),this.spread=t,t.left&&this.leftPage.loadPage(t.left),t.right&&this.rightPage.loadPage(t.right)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}layout(){if(!this.viewport||!this.leftPage.size&&this.spread.left||!this.rightPage.size&&this.spread.right)return;const t={top:this.insets.top,right:0,bottom:this.insets.bottom,left:this.insets.left};this.leftPage.setMargins(t);const e={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:0};this.rightPage.setMargins(e),this.spread.right?this.spread.left||this.leftPage.setPlaceholder(this.rightPage.size):this.rightPage.setPlaceholder(this.leftPage.size);const r=this.leftPage.size.width+this.rightPage.size.width,n=Math.max(this.leftPage.size.height,this.rightPage.size.height),i={width:r,height:n},a={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},s=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,i,a);this.metaViewport.content=(new o).setInitialScale(s).setMinimumScale(s).setWidth(r).setHeight(n).build(),this.leftPage.show(),this.rightPage.show(),this.listener.onLayout()}}class s{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}var u,c;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(u||(u={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(c||(c={}));var l=r(5155);function f(t,e){const r=e.getBoundingClientRect(),o=n(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:o,textBefore:t.textBefore,textAfter:t.textAfter}}r.n(l)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}class y{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const h=document.getElementById("page-left"),g=document.getElementById("page-right"),d=document.querySelector("meta[name=viewport]");Window.prototype.doubleArea=new class{constructor(t,e,r,n,o,i){const u=new s(t,o,i);this.manager=new a(t,e,r,n,u)}setLeftMessagePort(t){this.manager.setLeftMessagePort(t)}setRightMessagePort(t){this.manager.setRightMessagePort(t)}loadSpread(t){this.manager.loadSpread(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,h,g,d,window.gestures,window.documentState),window.doubleSelection=new class{constructor(t,e,r){this.requestStates=new Map,this.isLeftInitialized=!1,this.isRightInitialized=!1,this.leftIframe=t,this.rightIframe=e,this.listener=r;const n={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.leftIframe);this.onSelectionAvailable(t,"left",r)}else this.onSelectionAvailable(t,"left",e)}};this.leftWrapper=new p(n);const o={onSelectionAvailable:(t,e)=>{if(e){const r=f(e,this.rightIframe);this.onSelectionAvailable(t,"right",r)}else this.onSelectionAvailable(t,"right",e)}};this.rightWrapper=new p(o)}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t),this.isLeftInitialized=!0}setRightMessagePort(t){this.rightWrapper.setMessagePort(t),this.isRightInitialized=!0}requestSelection(t){this.isLeftInitialized&&this.isRightInitialized?(this.requestStates.set(t,"pending"),this.leftWrapper.requestSelection(t),this.rightWrapper.requestSelection(t)):this.isLeftInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.leftWrapper.requestSelection(t)):this.isRightInitialized?(this.requestStates.set(t,"firstResponseWasNull"),this.rightWrapper.requestSelection(t)):(this.requestStates.set(t,"firstResponseWasNull"),this.onSelectionAvailable(t,"left",null))}clearSelection(){this.leftWrapper.clearSelection(),this.rightWrapper.clearSelection()}onSelectionAvailable(t,e,r){const n=this.requestStates.get(t);if(!n)return;if(!r&&"pending"===n)return void this.requestStates.set(t,"firstResponseWasNull");this.requestStates.delete(t);const o=JSON.stringify(r);this.listener.onSelectionAvailable(t,e,o)}}(h,g,window.doubleSelectionListener),window.doubleDecorations=new class{constructor(){this.leftWrapper=new y,this.rightWrapper=new y}setLeftMessagePort(t){this.leftWrapper.setMessagePort(t)}setRightMessagePort(t){this.rightWrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.leftWrapper.registerTemplates(e),this.rightWrapper.registerTemplates(e)}addDecoration(t,e,r){const n=function(t){return JSON.parse(t)}(t);switch(e){case"left":this.leftWrapper.addDecoration(n,r);break;case"right":this.rightWrapper.addDecoration(n,r);break;default:throw Error(`Unknown iframe type: ${e}`)}}removeDecoration(t,e){this.leftWrapper.removeDecoration(t,e),this.rightWrapper.removeDecoration(t,e)}},window.doubleInitialization=new class{constructor(t,e,r,n,o,i,a){this.areaReadySemaphore=2,this.selectionReadySemaphore=2,this.decorationReadySemaphore=2,this.listener=e,this.areaBridge=o,this.selectionBridge=i,this.decorationsBridge=a,t.addEventListener("message",(t=>{t.ports[0]&&(t.source===r.contentWindow?this.onInitMessageLeft(t):t.source==n.contentWindow&&this.onInitMessageRight(t))}))}loadSpread(t){const e=(t.left?1:0)+(t.right?1:0);this.areaReadySemaphore=e,this.selectionReadySemaphore=e,this.decorationReadySemaphore=e,this.areaBridge.loadSpread(t)}onInitMessageLeft(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setLeftMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setLeftMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setLeftMessagePort(r),this.onInitDecorationMessage()}}onInitMessageRight(t){const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":this.areaBridge.setRightMessagePort(r),this.onInitAreaMessage();break;case"InitSelection":this.selectionBridge.setRightMessagePort(r),this.onInitSelectionMessage();break;case"InitDecorations":this.decorationsBridge.setRightMessagePort(r),this.onInitDecorationMessage()}}onInitAreaMessage(){this.areaReadySemaphore-=1,0==this.areaReadySemaphore&&this.listener.onAreaApiAvailable()}onInitSelectionMessage(){this.selectionReadySemaphore-=1,0==this.selectionReadySemaphore&&this.listener.onSelectionApiAvailable()}onInitDecorationMessage(){this.decorationReadySemaphore-=1,0==this.decorationReadySemaphore&&this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,h,g,window.doubleArea,window.doubleSelection,window.doubleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); //# sourceMappingURL=fixed-double-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map index bcef1cc4a7..1326e18f5d 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-double-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium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BACL/sB,KAAKwgB,SAASkN,0BAEtB,GJpH8D9Z,OAAQA,OAAO+Z,cAAepI,EAAYC,EAAa5R,OAAO8W,WAAY9W,OAAO0X,gBAAiB1X,OAAOuY,mBAC3KvY,OAAO+Z,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/double-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/index-fixed-double.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class DoubleAreaManager {\n constructor(window, leftIframe, rightIframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n const leftPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n const rightPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.leftPage = new PageManager(window, leftIframe, leftPageListener);\n this.rightPage = new PageManager(window, rightIframe, rightPageListener);\n this.metaViewport = metaViewport;\n }\n setLeftMessagePort(messagePort) {\n this.leftPage.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightPage.setMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.leftPage.hide();\n this.rightPage.hide();\n this.spread = spread;\n if (spread.left) {\n this.leftPage.loadPage(spread.left);\n }\n if (spread.right) {\n this.rightPage.loadPage(spread.right);\n }\n }\n setViewport(size, insets) {\n if (this.viewport == size && this.insets == insets) {\n return;\n }\n this.viewport = size;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n layout() {\n if (!this.viewport ||\n (!this.leftPage.size && this.spread.left) ||\n (!this.rightPage.size && this.spread.right)) {\n return;\n }\n const leftMargins = {\n top: this.insets.top,\n right: 0,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.leftPage.setMargins(leftMargins);\n const rightMargins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: 0,\n };\n this.rightPage.setMargins(rightMargins);\n if (!this.spread.right) {\n this.rightPage.setPlaceholder(this.leftPage.size);\n }\n else if (!this.spread.left) {\n this.leftPage.setPlaceholder(this.rightPage.size);\n }\n const contentWidth = this.leftPage.size.width + this.rightPage.size.width;\n const contentHeight = Math.max(this.leftPage.size.height, this.rightPage.size.height);\n const contentSize = { width: contentWidth, height: contentHeight };\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, contentSize, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(contentWidth)\n .setHeight(contentHeight)\n .build();\n this.leftPage.show();\n this.rightPage.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedDoubleAreaBridge as FixedDoubleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedDoubleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedDoubleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedDoubleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst leftIframe = document.getElementById(\"page-left\");\nconst rightIframe = document.getElementById(\"page-right\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nWindow.prototype.doubleArea = new FixedDoubleAreaBridge(window, leftIframe, rightIframe, metaViewport, window.gestures, window.documentState);\nwindow.doubleSelection = new FixedDoubleSelectionBridge(leftIframe, rightIframe, window.doubleSelectionListener);\nwindow.doubleDecorations = new FixedDoubleDecorationsBridge();\nwindow.doubleInitialization = new FixedDoubleInitializationBridge(window, window.fixedApiState, leftIframe, rightIframe, window.doubleArea, window.doubleSelection, window.doubleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","event","data","kind","onContentSizeAvailable","onTap","onLinkActivated","onDecorationActivated","URL","href","outerHtml","_a","onIframeLoaded","offsetToParentCoordinates","offset","iframeRect","visualViewport","offsetLeft","scale","offsetTop","rectToParentCoordinates","rect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","ViewportStringBuilder","setInitialScale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","DoubleAreaManager","leftIframe","rightIframe","metaViewport","fit","insets","clientX","clientY","leftPageListener","layout","gestureEvent","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","id","group","rightPageListener","leftPage","rightPage","setLeftMessagePort","setRightMessagePort","loadSpread","spread","setViewport","viewport","setFit","leftMargins","rightMargins","contentWidth","contentHeight","contentSize","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","onLayout","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","stringify","stringOffset","stringRect","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","TrimDirection","ResolveDirection","selection","selectionRect","selectedText","textBefore","textAfter","selectionListener","onFeedback","requestSelection","requestId","send","clearSelection","feedback","onSelectionAvailable","postMessage","registerTemplates","templates","addDecoration","decoration","removeDecoration","getElementById","querySelector","Window","doubleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","doubleSelection","requestStates","isLeftInitialized","isRightInitialized","leftWrapperListener","resolvedSelection","leftWrapper","rightWrapperListener","rightWrapper","requestState","delete","selectionAsJson","doubleSelectionListener","doubleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","doubleInitialization","areaBridge","selectionBridge","decorationsBridge","areaReadySemaphore","selectionReadySemaphore","decorationReadySemaphore","ports","onInitMessageLeft","onInitMessageRight","pageNb","initMessage","onInitAreaMessage","onInitSelectionMessage","onInitDecorationMessage","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-double-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,EAAWD,EAASD,EAAa,6BAErCG,EAAOC,QAAU,SAA4BC,EAAMC,GAClD,IAAIC,EAAYP,EAAaK,IAAQC,GACrC,MAAyB,mBAAdC,GAA4BL,EAASG,EAAM,gBAAkB,EAChEJ,EAASM,GAEVA,CACR,C,oCCZA,IAAIC,EAAO,EAAQ,MACfR,EAAe,EAAQ,MAEvBS,EAAST,EAAa,8BACtBU,EAAQV,EAAa,6BACrBW,EAAgBX,EAAa,mBAAmB,IAASQ,EAAKI,KAAKF,EAAOD,GAE1EI,EAAQb,EAAa,qCAAqC,GAC1Dc,EAAkBd,EAAa,2BAA2B,GAC1De,EAAOf,EAAa,cAExB,GAAIc,EACH,IACCA,EAAgB,CAAC,EAAG,IAAK,CAAEE,MAAO,GACnC,CAAE,MAAOC,GAERH,EAAkB,IACnB,CAGDX,EAAOC,QAAU,SAAkBc,GAClC,IAAIC,EAAOR,EAAcH,EAAME,EAAOU,WAYtC,OAXIP,GAASC,GACDD,EAAMM,EAAM,UACdE,cAERP,EACCK,EACA,SACA,CAAEH,MAAO,EAAID,EAAK,EAAGG,EAAiBI,QAAUF,UAAUE,OAAS,MAI/DH,CACR,EAEA,IAAII,EAAY,WACf,OAAOZ,EAAcH,EAAMC,EAAQW,UACpC,EAEIN,EACHA,EAAgBX,EAAOC,QAAS,QAAS,CAAEY,MAAOO,IAElDpB,EAAOC,QAAQoB,MAAQD,C,oCC3CxB,IAAIE,EAAyB,EAAQ,IAAR,GAEzBzB,EAAe,EAAQ,MAEvBc,EAAkBW,GAA0BzB,EAAa,2BAA2B,GAEpF0B,EAAe1B,EAAa,iBAC5B2B,EAAa3B,EAAa,eAE1B4B,EAAO,EAAQ,KAGnBzB,EAAOC,QAAU,SAChByB,EACAC,EACAd,GAEA,IAAKa,GAAu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EtB,GJpH8D9Z,OAAQA,OAAO+Z,cAAepI,EAAYC,EAAa5R,OAAO8W,WAAY9W,OAAO0X,gBAAiB1X,OAAOuY,mBAC3KvY,OAAO+Z,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/double-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/index-fixed-double.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n return;\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class DoubleAreaManager {\n constructor(window, leftIframe, rightIframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n const leftPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = leftIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n const rightPageListener = {\n onIframeLoaded: () => {\n this.layout();\n },\n onTap: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n onDecorationActivated: (gestureEvent) => {\n const boundingRect = rightIframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(gestureEvent.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(gestureEvent.rect, boundingRect);\n const shiftedEvent = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.leftPage = new PageManager(window, leftIframe, leftPageListener);\n this.rightPage = new PageManager(window, rightIframe, rightPageListener);\n this.metaViewport = metaViewport;\n }\n setLeftMessagePort(messagePort) {\n this.leftPage.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightPage.setMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.leftPage.hide();\n this.rightPage.hide();\n this.spread = spread;\n if (spread.left) {\n this.leftPage.loadPage(spread.left);\n }\n if (spread.right) {\n this.rightPage.loadPage(spread.right);\n }\n }\n setViewport(size, insets) {\n if (this.viewport == size && this.insets == insets) {\n return;\n }\n this.viewport = size;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n layout() {\n if (!this.viewport ||\n (!this.leftPage.size && this.spread.left) ||\n (!this.rightPage.size && this.spread.right)) {\n return;\n }\n const leftMargins = {\n top: this.insets.top,\n right: 0,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.leftPage.setMargins(leftMargins);\n const rightMargins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: 0,\n };\n this.rightPage.setMargins(rightMargins);\n if (!this.spread.right) {\n this.rightPage.setPlaceholder(this.leftPage.size);\n }\n else if (!this.spread.left) {\n this.leftPage.setPlaceholder(this.rightPage.size);\n }\n const contentWidth = this.leftPage.size.width + this.rightPage.size.width;\n const contentHeight = Math.max(this.leftPage.size.height, this.rightPage.size.height);\n const contentSize = { width: contentWidth, height: contentHeight };\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, contentSize, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(contentWidth)\n .setHeight(contentHeight)\n .build();\n this.leftPage.show();\n this.rightPage.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedDoubleAreaBridge as FixedDoubleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedDoubleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedDoubleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedDoubleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst leftIframe = document.getElementById(\"page-left\");\nconst rightIframe = document.getElementById(\"page-right\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nWindow.prototype.doubleArea = new FixedDoubleAreaBridge(window, leftIframe, rightIframe, metaViewport, window.gestures, window.documentState);\nwindow.doubleSelection = new FixedDoubleSelectionBridge(leftIframe, rightIframe, window.doubleSelectionListener);\nwindow.doubleDecorations = new FixedDoubleDecorationsBridge();\nwindow.doubleInitialization = new FixedDoubleInitializationBridge(window, window.fixedApiState, leftIframe, rightIframe, window.doubleArea, window.doubleSelection, window.doubleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","event","data","kind","onContentSizeAvailable","onTap","onLinkActivated","onDecorationActivated","URL","href","outerHtml","_a","onIframeLoaded","offsetToParentCoordinates","offset","iframeRect","visualViewport","offsetLeft","scale","offsetTop","rectToParentCoordinates","rect","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","ViewportStringBuilder","setInitialScale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","DoubleAreaManager","leftIframe","rightIframe","metaViewport","fit","insets","clientX","clientY","leftPageListener","layout","gestureEvent","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","id","group","rightPageListener","leftPage","rightPage","setLeftMessagePort","setRightMessagePort","loadSpread","spread","setViewport","viewport","setFit","leftMargins","rightMargins","contentWidth","contentHeight","contentSize","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","onLayout","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","stringify","stringOffset","stringRect","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","TrimDirection","ResolveDirection","selection","selectionRect","selectedText","textBefore","textAfter","selectionListener","onFeedback","requestSelection","requestId","send","clearSelection","feedback","onSelectionAvailable","postMessage","registerTemplates","templates","addDecoration","decoration","removeDecoration","getElementById","querySelector","Window","doubleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","doubleSelection","requestStates","isLeftInitialized","isRightInitialized","leftWrapperListener","resolvedSelection","leftWrapper","rightWrapperListener","rightWrapper","requestState","delete","selectionAsJson","doubleSelectionListener","doubleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","doubleInitialization","areaBridge","selectionBridge","decorationsBridge","areaReadySemaphore","selectionReadySemaphore","decorationReadySemaphore","ports","onInitMessageLeft","onInitMessageRight","pageNb","initMessage","onInitAreaMessage","onInitSelectionMessage","onInitDecorationMessage","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js index 5cbc752523..657ecb9768 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(b)===y&&(h[g]|=1<0&&w[m]>=r+i;)m-=1;m===a&&w[m]<=r&&(w[m]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var m=c(u,h);u=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(d[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var N=r(7002),F=N.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function W(t){return w.call(String(t),/"/g,""")}function L(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!q(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return g?D(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return g?D(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return L(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:K(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(L(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&N)return N(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return K(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?m.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return G.call(t,e)}function H(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function K(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=L(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,w=p(g,"u")>-1;return n(d,r,m,w)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),w=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof w&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return c(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===g(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return b.set(t,"[[Done]]",!0),c(a,!1)})),o&&(m(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,g,d=r(1844);function b(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,d.Z)(t,e,r)}function m(t,e){return 0===e.length||0===t.length?0:1-b(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(g||(g={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===g.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=b(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?m(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?m(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,g=u?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,b=(u?g:h)/d;function m(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${b}px`;const r=Math.floor(e.top/b)*b;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${b}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/b)*b;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,m(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}var C=r(5155);r.n(C)().shim();class T{constructor(t,e){this.decorationManager=e,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"registerTemplates":return this.registerTemplates(t.templates);case"addDecoration":return this.addDecoration(t.decoration,t.group);case"removeDecoration":return this.removeDecoration(t.id,t.group)}}registerTemplates(t){this.decorationManager.registerTemplates(t)}addDecoration(t,e){this.decorationManager.addDecoration(t,e)}removeDecoration(t,e){this.decorationManager.removeDecoration(t,e)}}class I{constructor(t){this.messagePort=t}send(t){this.messagePort.postMessage(t)}}class M{constructor(t,e){this.selectionManager=e,this.messagePort=t,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"requestSelection":return this.onRequestSelection(t.requestId);case"clearSelection":return this.onClearSelection()}}onRequestSelection(t){const e={kind:"selectionAvailable",requestId:t,selection:this.selectionManager.getCurrentSelection()};this.sendFeedback(e)}onClearSelection(){this.selectionManager.clearSelection()}sendFeedback(t){this.messagePort.postMessage(t)}}const $=new class{constructor(t){this.window=t}initAreaManager(){const t=this.initChannel("InitAreaManager");return new I(t)}initSelection(t){const e=this.initChannel("InitSelection");new M(e,t)}initDecorations(t){const e=this.initChannel("InitDecorations");new T(e,t)}initChannel(t){const e=new MessageChannel;return this.window.parent.postMessage(t,"*",[e.port2]),e.port1}}(window),D=$.initAreaManager(),N=new class{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}(window);$.initSelection(N);const F=new class{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new R(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}(window);$.initDecorations(F);const k=function(t){const e=window.document.querySelector("meta[name=viewport]");if(e&&e instanceof HTMLMetaElement)return function(t){const e=/(\w+) *= *([^\s,]+)/g,r=new Map;let n;for(;n=e.exec(t);)null!=n&&r.set(n[1],n[2]);const o=parseFloat(r.get("width")),i=parseFloat(r.get("height"));return o&&i?{width:o,height:i}:void 0}(e.content)}();D.send({kind:"contentSize",size:k});const B=new class{constructor(t){this.messageSender=t}onTap(t){const e={offset:{x:t.clientX,y:t.clientY}};this.messageSender.send({kind:"tap",event:e})}onLinkActivated(t,e){this.messageSender.send({kind:"linkActivated",href:t,outerHtml:e})}onDecorationActivated(t){const e={id:t.id,group:t.group,rect:t.rect,offset:{x:t.event.clientX,y:t.event.clientY}};this.messageSender.send({kind:"decorationActivated",event:e})}}(D);new class{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}(window,B,F)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(b)===y&&(h[g]|=1<0&&w[m]>=r+i;)m-=1;m===a&&w[m]<=r&&(w[m]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var m=c(u,h);u=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(d[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,d=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var N=r(7002),F=N.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function W(t){return w.call(String(t),/"/g,""")}function L(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!q(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return g?D(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return g?D(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return L(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=b.call(d.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:K(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(L(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&N)return N(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return J("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return J("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return J("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return K(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?m.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return G.call(t,e)}function H(t){return g.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function K(t){return"Object("+t+")"}function J(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=L(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var d=0;d=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,d=f.matcher,b=s(o(e,"lastIndex"));i(d,"lastIndex",b,!0);var m=p(g,"g")>-1,w=p(g,"u")>-1;return n(d,r,m,w)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),d=r(1874),b=r(7284),m=r(2263),w=function(t,e,r,n){if("String"!==d(e))throw new i("`S` must be a string");if("Boolean"!==d(r))throw new i("`global` must be a boolean");if("Boolean"!==d(n))throw new i("`fullUnicode` must be a boolean");b.set(this,"[[IteratingRegExp]]",t),b.set(this,"[[IteratedString]]",e),b.set(this,"[[Global]]",r),b.set(this,"[[Unicode]]",n),b.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==d(t))throw new i("receiver must be an object");if(!(t instanceof w&&b.has(t,"[[IteratingRegExp]]")&&b.has(t,"[[IteratedString]]")&&b.has(t,"[[Global]]")&&b.has(t,"[[Unicode]]")&&b.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(b.get(t,"[[Done]]"))return c(void 0,!0);var e=b.get(t,"[[IteratingRegExp]]"),r=b.get(t,"[[IteratedString]]"),n=b.get(t,"[[Global]]"),o=b.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return b.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===g(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return b.set(t,"[[Done]]",!0),c(a,!1)})),o&&(m(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),d=r(1874);t.exports=function t(e){if("String"!==d(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,g,d=r(1844);function b(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,d.Z)(t,e,r)}function m(t,e){return 0===e.length||0===t.length?0:1-b(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(g||(g={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===g.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=b(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?m(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?m(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,g=u?window.innerWidth:window.innerHeight,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,b=(u?g:h)/d;function m(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${b}px`;const r=Math.floor(e.top/b)*b;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${b}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/b)*b;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,m(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,m(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}var C=r(5155);r.n(C)().shim();class T{constructor(t,e){this.decorationManager=e,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"registerTemplates":return this.registerTemplates(t.templates);case"addDecoration":return this.addDecoration(t.decoration,t.group);case"removeDecoration":return this.removeDecoration(t.id,t.group)}}registerTemplates(t){this.decorationManager.registerTemplates(t)}addDecoration(t,e){this.decorationManager.addDecoration(t,e)}removeDecoration(t,e){this.decorationManager.removeDecoration(t,e)}}class I{constructor(t){this.messagePort=t}send(t){this.messagePort.postMessage(t)}}class M{constructor(t,e){this.selectionManager=e,this.messagePort=t,t.onmessage=t=>{this.onCommand(t.data)}}onCommand(t){switch(t.kind){case"requestSelection":return this.onRequestSelection(t.requestId);case"clearSelection":return this.onClearSelection()}}onRequestSelection(t){const e={kind:"selectionAvailable",requestId:t,selection:this.selectionManager.getCurrentSelection()};this.sendFeedback(e)}onClearSelection(){this.selectionManager.clearSelection()}sendFeedback(t){this.messagePort.postMessage(t)}}const $=new class{constructor(t){this.window=t}initAreaManager(){const t=this.initChannel("InitAreaManager");return new I(t)}initSelection(t){const e=this.initChannel("InitSelection");new M(e,t)}initDecorations(t){const e=this.initChannel("InitDecorations");new T(e,t)}initChannel(t){const e=new MessageChannel;return this.window.parent.postMessage(t,"*",[e.port2]),e.port1}}(window),D=$.initAreaManager(),N=new class{constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}(window);$.initSelection(N);const F=new class{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new R(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}(window);$.initDecorations(F);const k=function(t){const e=window.document.querySelector("meta[name=viewport]");if(e&&e instanceof HTMLMetaElement)return function(t){const e=/(\w+) *= *([^\s,]+)/g,r=new Map;let n;for(;n=e.exec(t);)null!=n&&r.set(n[1],n[2]);const o=parseFloat(r.get("width")),i=parseFloat(r.get("height"));return o&&i?{width:o,height:i}:void 0}(e.content)}();D.send({kind:"contentSize",size:k});const B=new class{constructor(t){this.messageSender=t}onTap(t){const e={offset:{x:t.clientX,y:t.clientY}};this.messageSender.send({kind:"tap",event:e})}onLinkActivated(t,e){this.messageSender.send({kind:"linkActivated",href:t,outerHtml:e})}onDecorationActivated(t){const e={id:t.id,group:t.group,rect:t.rect,offset:{x:t.event.clientX,y:t.event.clientY}};this.messageSender.send({kind:"decorationActivated",event:e})}}(D);new class{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e?e instanceof HTMLAnchorElement&&(this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()):(r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t))}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}(window,B,F)}()}(); //# sourceMappingURL=fixed-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map index 1b7fa45f84..8922d6e340 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fix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AG06B,EAAad,MAAMG,UAEnE1zB,KAAK6wB,cAAcvB,KAAK,CACpBN,KAAM,sBACNuE,MAAOA,GAEf,GAEoD1C,GACxD,IGrDO,MACH,WAAAhhB,CAAYgD,EAAQ6hB,EAAU9F,GAC1B5uB,KAAK6S,OAASA,EACd7S,KAAK00B,SAAWA,EAChB10B,KAAK4uB,kBAAoBA,EACzBpmB,SAASiqB,iBAAiB,SAAUc,IAChCvzB,KAAK20B,QAAQpB,EAAM,IACpB,EACP,CACA,OAAAoB,CAAQpB,GACJ,GAAIA,EAAMqB,iBACN,OAEJ,IAAIC,EAiBAC,EAVJ,GALID,EADAtB,EAAMxzB,kBAAkBmO,YACPlO,KAAK+0B,0BAA0BxB,EAAMxzB,QAGrC,KAEjB80B,EAAgB,CAChB,KAAIA,aAA0BG,mBAM1B,OALAh1B,KAAK00B,SAASJ,gBAAgBO,EAAeN,KAAMM,EAAeI,WAClE1B,EAAM2B,kBACN3B,EAAM4B,gBAKd,CAGIL,EADA90B,KAAK4uB,kBAED5uB,KAAK4uB,kBAAkB0E,2BAA2BC,GAG3B,KAE3BuB,EACA90B,KAAK00B,SAASD,sBAAsBK,GAGpC90B,KAAK00B,SAASN,MAAMb,EAI5B,CAEA,yBAAAwB,CAA0BjP,GACtB,OAAe,MAAXA,EACO,MAgBqD,GAdxC,CACpB,IACA,QACA,SACA,SACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,SAEgBtY,QAAQsY,EAAQ3X,SAASxD,gBAIzCmb,EAAQsP,aAAa,oBACoC,SAAzDtP,EAAQ1X,aAAa,mBAAmBzD,cAJjCmb,EAQPA,EAAQW,cACDzmB,KAAK+0B,0BAA0BjP,EAAQW,eAE3C,IACX,GH1BiB5T,OAAQshB,EAAmBvF,E","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/fixed/iframe-message.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-injectable.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","export class IframeMessageSender {\n constructor(messagePort) {\n this.messagePort = messagePort;\n }\n send(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\n/**\n * Script loaded by fixed layout resources.\n */\nimport { DecorationManager, } from \"./common/decoration\";\nimport { GesturesDetector } from \"./common/gestures\";\nimport { SelectionManager } from \"./common/selection\";\nimport { parseViewportString } from \"./util/viewport\";\nimport { FixedInitializerIframeSide } from \"./bridge/all-initialization-bridge\";\nconst initializer = new FixedInitializerIframeSide(window);\nconst messageSender = initializer.initAreaManager();\nconst selectionManager = new SelectionManager(window);\ninitializer.initSelection(selectionManager);\nconst decorationManager = new DecorationManager(window);\ninitializer.initDecorations(decorationManager);\nconst viewportSize = parseContentSize(window.document);\nmessageSender.send({ kind: \"contentSize\", size: viewportSize });\nclass MessagingGesturesListener {\n constructor(messageSender) {\n this.messageSender = messageSender;\n }\n onTap(gestureEvent) {\n const event = {\n offset: { x: gestureEvent.clientX, y: gestureEvent.clientY },\n };\n this.messageSender.send({ kind: \"tap\", event: event });\n }\n onLinkActivated(href, outerHtml) {\n this.messageSender.send({\n kind: \"linkActivated\",\n href: href,\n outerHtml: outerHtml,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated(gestureEvent) {\n const event = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: gestureEvent.rect,\n offset: { x: gestureEvent.event.clientX, y: gestureEvent.event.clientY },\n };\n this.messageSender.send({\n kind: \"decorationActivated\",\n event: event,\n });\n }\n}\nconst messagingListener = new MessagingGesturesListener(messageSender);\nnew GesturesDetector(window, messagingListener, decorationManager);\nfunction parseContentSize(document) {\n const viewport = document.querySelector(\"meta[name=viewport]\");\n if (!viewport || !(viewport instanceof HTMLMetaElement)) {\n return undefined;\n }\n return parseViewportString(viewport.content);\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationGroup","id","styles","items","lastItemId","container","groupId","groupName","add","decoration","cssSelector","textQuote","querySelector","body","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","item","clickableElements","layout","remove","findIndex","it","relayout","clearContainer","requireContainer","createElement","dataset","group","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","clientWidth","getBoundingClientRect","DOMRect","elementTemplate","template","innerHTML","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","DecorationWrapperIframeSide","messagePort","decorationManager","onmessage","onCommand","command","kind","registerTemplates","templates","addDecoration","removeDecoration","IframeMessageSender","send","postMessage","SelectionWrapperIframeSide","manager","selectionManager","onRequestSelection","requestId","onClearSelection","feedback","selection","getCurrentSelection","sendFeedback","clearSelection","initializer","initAreaManager","initChannel","initSelection","initDecorations","initMessage","messageChannel","MessageChannel","port2","port1","messageSender","isSelecting","getSelection","removeAllRanges","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","groups","lastGroupId","addEventListener","lastSize","ResizeObserver","requestAnimationFrame","clientHeight","relayoutDecorations","observe","stylesheet","styleElement","getElementsByTagName","appendChild","getGroup","values","handleDecorationClickEvent","event","groupContent","clientX","clientY","findTarget","viewportSize","viewport","HTMLMetaElement","viewportString","properties","parseViewportString","parseContentSize","messagingListener","onTap","gestureEvent","onLinkActivated","href","outerHtml","onDecorationActivated","listener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","hasAttribute"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC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K4uB,kBAAoBA,EACzBpmB,SAASiqB,iBAAiB,SAAUc,IAChCvzB,KAAK20B,QAAQpB,EAAM,IACpB,EACP,CACA,OAAAoB,CAAQpB,GACJ,GAAIA,EAAMqB,iBACN,OAEJ,IAAIC,EAeAC,EAbAD,EADAtB,EAAMxzB,kBAAkBmO,YACPlO,KAAK+0B,0BAA0BxB,EAAMxzB,QAGrC,KAEjB80B,EACIA,aAA0BG,oBAC1Bh1B,KAAK00B,SAASJ,gBAAgBO,EAAeN,KAAMM,EAAeI,WAClE1B,EAAM2B,kBACN3B,EAAM4B,mBAMVL,EADA90B,KAAK4uB,kBAED5uB,KAAK4uB,kBAAkB0E,2BAA2BC,GAG3B,KAE3BuB,EACA90B,KAAK00B,SAASD,sBAAsBK,GAGpC90B,KAAK00B,SAASN,MAAMb,GAI5B,CAEA,yBAAAwB,CAA0BjP,GACtB,OAAe,MAAXA,EACO,MAgBqD,GAdxC,CACpB,IACA,QACA,SACA,SACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,SAEgBtY,QAAQsY,EAAQ3X,SAASxD,gBAIzCmb,EAAQsP,aAAa,oBACoC,SAAzDtP,EAAQ1X,aAAa,mBAAmBzD,cAJjCmb,EAQPA,EAAQW,cACDzmB,KAAK+0B,0BAA0BjP,EAAQW,eAE3C,IACX,GHxBiB5T,OAAQshB,EAAmBvF,E","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/fixed/iframe-message.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-injectable.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/gestures.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","export class IframeMessageSender {\n constructor(messagePort) {\n this.messagePort = messagePort;\n }\n send(message) {\n this.messagePort.postMessage(message);\n }\n}\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\n/**\n * Script loaded by fixed layout resources.\n */\nimport { DecorationManager, } from \"./common/decoration\";\nimport { GesturesDetector } from \"./common/gestures\";\nimport { SelectionManager } from \"./common/selection\";\nimport { parseViewportString } from \"./util/viewport\";\nimport { FixedInitializerIframeSide } from \"./bridge/all-initialization-bridge\";\nconst initializer = new FixedInitializerIframeSide(window);\nconst messageSender = initializer.initAreaManager();\nconst selectionManager = new SelectionManager(window);\ninitializer.initSelection(selectionManager);\nconst decorationManager = new DecorationManager(window);\ninitializer.initDecorations(decorationManager);\nconst viewportSize = parseContentSize(window.document);\nmessageSender.send({ kind: \"contentSize\", size: viewportSize });\nclass MessagingGesturesListener {\n constructor(messageSender) {\n this.messageSender = messageSender;\n }\n onTap(gestureEvent) {\n const event = {\n offset: { x: gestureEvent.clientX, y: gestureEvent.clientY },\n };\n this.messageSender.send({ kind: \"tap\", event: event });\n }\n onLinkActivated(href, outerHtml) {\n this.messageSender.send({\n kind: \"linkActivated\",\n href: href,\n outerHtml: outerHtml,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated(gestureEvent) {\n const event = {\n id: gestureEvent.id,\n group: gestureEvent.group,\n rect: gestureEvent.rect,\n offset: { x: gestureEvent.event.clientX, y: gestureEvent.event.clientY },\n };\n this.messageSender.send({\n kind: \"decorationActivated\",\n event: event,\n });\n }\n}\nconst messagingListener = new MessagingGesturesListener(messageSender);\nnew GesturesDetector(window, messagingListener, decorationManager);\nfunction parseContentSize(document) {\n const viewport = document.querySelector(\"meta[name=viewport]\");\n if (!viewport || !(viewport instanceof HTMLMetaElement)) {\n return undefined;\n }\n return parseViewportString(viewport.content);\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n return;\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationGroup","id","styles","items","lastItemId","container","groupId","groupName","add","decoration","cssSelector","textQuote","querySelector","body","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","item","clickableElements","layout","remove","findIndex","it","relayout","clearContainer","requireContainer","createElement","dataset","group","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","clientWidth","getBoundingClientRect","DOMRect","elementTemplate","template","innerHTML","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","DecorationWrapperIframeSide","messagePort","decorationManager","onmessage","onCommand","command","kind","registerTemplates","templates","addDecoration","removeDecoration","IframeMessageSender","send","postMessage","SelectionWrapperIframeSide","manager","selectionManager","onRequestSelection","requestId","onClearSelection","feedback","selection","getCurrentSelection","sendFeedback","clearSelection","initializer","initAreaManager","initChannel","initSelection","initDecorations","initMessage","messageChannel","MessageChannel","port2","port1","messageSender","isSelecting","getSelection","removeAllRanges","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","isCollapsed","anchorNode","focusNode","rangeCount","startNode","endNode","collapsed","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","groups","lastGroupId","addEventListener","lastSize","ResizeObserver","requestAnimationFrame","clientHeight","relayoutDecorations","observe","stylesheet","styleElement","getElementsByTagName","appendChild","getGroup","values","handleDecorationClickEvent","event","groupContent","clientX","clientY","findTarget","viewportSize","viewport","HTMLMetaElement","viewportString","properties","parseViewportString","parseContentSize","messagingListener","onTap","gestureEvent","onLinkActivated","href","outerHtml","onDecorationActivated","listener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","hasAttribute"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js index e6005488bf..9ca4355979 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js @@ -1,2 +1,2 @@ -!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],A(r,x([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(b[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function C(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var k=r(7002),B=k.custom,L=_(B)?B:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==z(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==z(t)||D&&"object"==typeof t&&D in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?C(e,w):w}if("bigint"==typeof e){var x=String(e)+"n";return g?C(e,x):x}var P=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var I,B=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=d.call(b.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=T?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||T?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Z(e,G);return B&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,B)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==z(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(L&&"function"==typeof e[L]&&k)return k(e,{depth:P-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,B)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(G(t,e))})),Y("Set",c.call(e),ut,B)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(G(E.call(e)));if(function(t){return!("[object Boolean]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==z(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(z(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":B?yt+"{"+Q(ct,B)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function z(t){return g.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return U(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,b=f.matcher,d=s(o(e,"lastIndex"));i(b,"lastIndex",d,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(b,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),b=r(1874),d=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==b(e))throw new i("`S` must be a string");if("Boolean"!==b(r))throw new i("`global` must be a boolean");if("Boolean"!==b(n))throw new i("`fullUnicode` must be a boolean");d.set(this,"[[IteratingRegExp]]",t),d.set(this,"[[IteratedString]]",e),d.set(this,"[[Global]]",r),d.set(this,"[[Unicode]]",n),d.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==b(t))throw new i("receiver must be an object");if(!(t instanceof v&&d.has(t,"[[IteratingRegExp]]")&&d.has(t,"[[IteratedString]]")&&d.has(t,"[[Global]]")&&d.has(t,"[[Unicode]]")&&d.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(d.get(t,"[[Done]]"))return u(void 0,!0);var e=d.get(t,"[[IteratingRegExp]]"),r=d.get(t,"[[IteratedString]]"),n=d.get(t,"[[Global]]"),o=d.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return d.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return d.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),b=r(1874);t.exports=function t(e){if("String"!==b(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}class e{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}class n{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}function o(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function i(t,e){const r={x:t.left,y:t.top},n={x:t.right,y:t.bottom},i=o(r,e),a=o(n,e);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class a{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class s{constructor(t,r,n,s){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.scale=1,this.listener=s,new a(t,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};s.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}}),this.metaViewport=n;const u={onIframeLoaded:()=>{this.onIframeLoaded()},onTap:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e);s.onTap({offset:n})},onLinkActivated:(t,e)=>{s.onLinkActivated(t,e)},onDecorationActivated:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e),a=i(t.rect,e),u={id:t.id,group:t.group,rect:a,offset:n};s.onDecorationActivated(u)}};this.page=new e(t,r,u)}setMessagePort(t){this.page.setMessagePort(t)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}loadResource(t){this.page.hide(),this.page.loadPage(t)}onIframeLoaded(){this.page.size&&this.layout()}layout(){if(!this.page.size||!this.viewport)return;const t={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:this.insets.left};this.page.setMargins(t);const e={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},r=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,this.page.size,e);this.metaViewport.content=(new n).setInitialScale(r).setMinimumScale(r).setWidth(this.page.size.width).setHeight(this.page.size.height).build(),this.scale=r,this.page.show(),this.listener.onLayout()}}class u{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}var c,l;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(c||(c={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(l||(l={}));var f=r(5155);r.n(f)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const y=document.getElementById("page"),h=document.querySelector("meta[name=viewport]");window.singleArea=new class{constructor(e,r,n,o,i){const a=new t(e,o,i);this.manager=new s(e,r,n,a)}setMessagePort(t){this.manager.setMessagePort(t)}loadResource(t){this.manager.loadResource(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,y,h,window.gestures,window.documentState),window.singleSelection=new class{constructor(t,e){this.iframe=t,this.listener=e;const r={onSelectionAvailable:(t,e)=>{let r;r=e?function(t,e){const r=e.getBoundingClientRect(),n=i(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:n,textBefore:t.textBefore,textAfter:t.textAfter}}(e,this.iframe):e;const n=JSON.stringify(r);this.listener.onSelectionAvailable(t,n)}};this.wrapper=new p(r)}setMessagePort(t){this.wrapper.setMessagePort(t)}requestSelection(t){this.wrapper.requestSelection(t)}clearSelection(){this.wrapper.clearSelection()}}(y,window.singleSelectionListener),window.singleDecorations=new class{constructor(){this.wrapper=new u}setMessagePort(t){this.wrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.wrapper.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.wrapper.addDecoration(r,e)}removeDecoration(t,e){this.wrapper.removeDecoration(t,e)}},window.singleInitialization=new class{constructor(t,e,r,n,o,i){this.window=t,this.listener=e,this.iframe=r,this.areaBridge=n,this.selectionBridge=o,this.decorationsBridge=i}loadResource(t){this.iframe.src=t,this.window.addEventListener("message",(t=>{console.log("message"),t.ports[0]&&t.source===this.iframe.contentWindow&&this.onInitMessage(t)}))}onInitMessage(t){console.log(`receiving init message ${t}`);const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":return this.initAreaManager(r);case"InitSelection":return this.initSelection(r);case"InitDecorations":return this.initDecorations(r)}}initAreaManager(t){this.areaBridge.setMessagePort(t),this.listener.onAreaApiAvailable()}initSelection(t){this.selectionBridge.setMessagePort(t),this.listener.onSelectionApiAvailable()}initDecorations(t){this.decorationsBridge.setMessagePort(t),this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,y,window.singleArea,window.singleSelection,window.singleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); +!function(){var t={3099:function(t,e,r){"use strict";var n=r(2870),o=r(2755),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(n,a,arguments);return u&&c&&u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(t,e);if(i)i(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),u=r(229)(),c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var u=e.call(t,r);if(o(u))return u;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,E,(function(t,e,r,o){n[n.length]=r?j(o,I,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=R("%"+n+"%",e),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],A(r,x([0,1],f)));for(var p=1,y=!0;p=r.length){var m=u(c,h);c=(y=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[h]}else y=S(c,h),c=c[h];y&&!l&&(b[s]=c)}}return c}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),u=r(3060)();if(u){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,b=Function.prototype.toString,d=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,j=Array.prototype.join,O=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function C(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var k=r(7002),B=k.custom,L=_(B)?B:null;function U(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function N(t){return v.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==z(t)||D&&"object"==typeof t&&D in t)}function $(t){return!("[object RegExp]"!==z(t)||D&&"object"==typeof t&&D in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return H(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return g?C(e,w):w}if("bigint"==typeof e){var x=String(e)+"n";return g?C(e,x):x}var P=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=P&&P>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var I,B=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=j.call(Array(t.indent+1)," ")}return{base:r,prev:j.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!$(e)){var J=function(t){if(t.name)return t.name;var e=d.call(b.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(tt.length>0?" { "+j.call(tt,", ")+" }":"")}if(_(e)){var et=T?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||T?et:K(et)}if((I=e)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Z(e,G);return B&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Q(it,B)+"]":"[ "+j.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==z(t)||D&&"object"==typeof t&&D in t)}(e)){var at=Z(e,G);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+j.call(at,", ")+" }":"{ ["+String(e)+"] "+j.call(A.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&u){if(L&&"function"==typeof e[L]&&k)return k(e,{depth:P-n});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,B)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(G(t,e))})),Y("Set",c.call(e),ut,B)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return!("[object Number]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return K(G(E.call(e)));if(function(t){return!("[object Boolean]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(h.call(e));if(function(t){return!("[object String]"!==z(t)||D&&"object"==typeof t&&D in t)}(e))return K(G(String(e)));if(!function(t){return!("[object Date]"!==z(t)||D&&"object"==typeof t&&D in t)}(e)&&!$(e)){var ct=Z(e,G),lt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&D&&Object(e)===e&&D in e?m.call(z(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+j.call(A.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ct.length?yt+"{}":B?yt+"{"+Q(ct,B)+"}":yt+"{ "+j.call(ct,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function z(t){return g.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(m.call(t,0,e.maxStringLength),e)+n}return U(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):j.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+j.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var g=0;g0)for(var b=0;b=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),u=o(a());n(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,c=/a/;t.exports=function(){if(!n||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=u(c),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return c(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){var r=g(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return h(e,n)}else if(r)return function(t,e){return!!g(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):u?(e||(e=new u),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=g(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),u=r(6751),c=r(3099),l=r(1143)(),f=r(483),p=c("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=u(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(u(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var c=s(e),l=new RegExp(t,"g");return n(h(l),l,[c])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),u=n(i);o(u,{getPolyfill:a,implementation:i,shim:s}),t.exports=u},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),u=r(5128),c=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,g=f((function(t){var e=this;if("Object"!==c(e))throw new TypeError('"this" value must be an Object');var r=u(t),f=function(t,e){var r="flags"in e?o(e,"flags"):u(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),g=f.flags,b=f.matcher,d=s(o(e,"lastIndex"));i(b,"lastIndex",d,!0);var m=p(g,"g")>-1,v=p(g,"u")>-1;return n(b,r,m,v)}),"[Symbol.matchAll]",!0);t.exports=g},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,u=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&u){var r=u(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var c=a(),l={};l[e]=c;var f={};f[e]=function(){return RegExp.prototype[e]!==c},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,u=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),u,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),u=r(818),c=n(s()),l=function(t){return i(t),c(t)};o(l,{getPolyfill:s,implementation:a,shim:u}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),u=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new u("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new u("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new u("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),u=r(1751),c=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=c(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":u(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),u=r(8277),c=r(1874);t.exports=function(t,e,r){if("Object"!==c(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,u,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),u=r(5702),c=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),g=r(5128),b=r(1874),d=r(7284),m=r(2263),v=function(t,e,r,n){if("String"!==b(e))throw new i("`S` must be a string");if("Boolean"!==b(r))throw new i("`global` must be a boolean");if("Boolean"!==b(n))throw new i("`fullUnicode` must be a boolean");d.set(this,"[[IteratingRegExp]]",t),d.set(this,"[[IteratedString]]",e),d.set(this,"[[Global]]",r),d.set(this,"[[Unicode]]",n),d.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),c(v.prototype,"next",(function(){var t=this;if("Object"!==b(t))throw new i("receiver must be an object");if(!(t instanceof v&&d.has(t,"[[IteratingRegExp]]")&&d.has(t,"[[IteratedString]]")&&d.has(t,"[[Global]]")&&d.has(t,"[[Unicode]]")&&d.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(d.get(t,"[[Done]]"))return u(void 0,!0);var e=d.get(t,"[[IteratingRegExp]]"),r=d.get(t,"[[IteratedString]]"),n=d.get(t,"[[Global]]"),o=d.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return d.set(t,"[[Done]]",!0),u(void 0,!0);if(n){if(""===g(l(a,"0"))){var c=h(l(e,"lastIndex")),f=s(r,c,o);y(e,"lastIndex",f,!0)}return u(a,!1)}return d.set(t,"[[Done]]",!0),u(a,!1)})),o&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&c(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),u=r(3301),c=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!c(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:u,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(u,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),u=r(1874),c=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==u(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&c(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),u=r(1874);t.exports=function(t,e){if("Object"!==u(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==u(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var c=i(r,t,[e]);if(null===c||"Object"===u(c))return c;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,u){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(u))throw new n("Assertion failed: `Throw` must be a Boolean");if(u){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),u=r(3099),c=r(7582),l=u("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),y=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["…","​","￾"].join("")+"]","g")),g=r(9434),b=r(1874);t.exports=function t(e){if("String"!==b(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=g(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),u=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?u(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var u=t.set;if(void 0!==u&&!s(u))throw new o("setter must be a function");e["[[Set]]"]=u}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),u=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,c){if(!i){if(!t(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(o in n&&u(n,o)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in c&&s(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(i(n,o,r(c)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),u={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&u["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=u[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";class t{constructor(t,e,r){this.window=t,this.gesturesApi=e,this.documentApi=r,this.resizeObserverAdded=!1,this.documentLoadedFired=!1}onTap(t){this.gesturesApi.onTap(JSON.stringify(t.offset))}onLinkActivated(t,e){this.gesturesApi.onLinkActivated(t,e)}onDecorationActivated(t){const e=JSON.stringify(t.offset),r=JSON.stringify(t.rect);this.gesturesApi.onDecorationActivated(t.id,t.group,r,e)}onLayout(){this.resizeObserverAdded||new ResizeObserver((()=>{requestAnimationFrame((()=>{const t=this.window.document.scrollingElement;!this.documentLoadedFired&&(null==t||t.scrollHeight>0||t.scrollWidth>0)?(this.documentApi.onDocumentLoadedAndSized(),this.documentLoadedFired=!0):this.documentApi.onDocumentResized()}))})).observe(this.window.document.body),this.resizeObserverAdded=!0}}class e{constructor(t,e,r){if(this.margins={top:0,right:0,bottom:0,left:0},!e.contentWindow)throw Error("Iframe argument must have been attached to DOM.");this.listener=r,this.iframe=e}setMessagePort(t){t.onmessage=t=>{this.onMessageFromIframe(t)}}show(){this.iframe.style.display="unset"}hide(){this.iframe.style.display="none"}setMargins(t){this.margins!=t&&(this.iframe.style.marginTop=this.margins.top+"px",this.iframe.style.marginLeft=this.margins.left+"px",this.iframe.style.marginBottom=this.margins.bottom+"px",this.iframe.style.marginRight=this.margins.right+"px")}loadPage(t){this.iframe.src=t}setPlaceholder(t){this.iframe.style.visibility="hidden",this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t}onMessageFromIframe(t){const e=t.data;switch(e.kind){case"contentSize":return this.onContentSizeAvailable(e.size);case"tap":return this.listener.onTap(e.event);case"linkActivated":return this.onLinkActivated(e);case"decorationActivated":return this.listener.onDecorationActivated(e.event)}}onLinkActivated(t){try{const e=new URL(t.href,this.iframe.src);this.listener.onLinkActivated(e.toString(),t.outerHtml)}catch(t){}}onContentSizeAvailable(t){t&&(this.iframe.style.width=t.width+"px",this.iframe.style.height=t.height+"px",this.size=t,this.listener.onIframeLoaded())}}class n{setInitialScale(t){return this.initialScale=t,this}setMinimumScale(t){return this.minimumScale=t,this}setWidth(t){return this.width=t,this}setHeight(t){return this.height=t,this}build(){const t=[];return this.initialScale&&t.push("initial-scale="+this.initialScale),this.minimumScale&&t.push("minimum-scale="+this.minimumScale),this.width&&t.push("width="+this.width),this.height&&t.push("height="+this.height),t.join(", ")}}function o(t,e){return{x:(t.x+e.left-visualViewport.offsetLeft)*visualViewport.scale,y:(t.y+e.top-visualViewport.offsetTop)*visualViewport.scale}}function i(t,e){const r={x:t.left,y:t.top},n={x:t.right,y:t.bottom},i=o(r,e),a=o(n,e);return{left:i.x,top:i.y,right:a.x,bottom:a.y,width:a.x-i.x,height:a.y-i.y}}class a{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e?e instanceof HTMLAnchorElement&&(this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()):(r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t))}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}class s{constructor(t,r,n,s){this.fit="contain",this.insets={top:0,right:0,bottom:0,left:0},this.scale=1,this.listener=s,new a(t,{onTap:t=>{const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale};s.onTap({offset:e})},onLinkActivated:t=>{throw Error("No interactive element in the root document.")},onDecorationActivated:t=>{throw Error("No decoration in the root document.")}}),this.metaViewport=n;const u={onIframeLoaded:()=>{this.onIframeLoaded()},onTap:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e);s.onTap({offset:n})},onLinkActivated:(t,e)=>{s.onLinkActivated(t,e)},onDecorationActivated:t=>{const e=r.getBoundingClientRect(),n=o(t.offset,e),a=i(t.rect,e),u={id:t.id,group:t.group,rect:a,offset:n};s.onDecorationActivated(u)}};this.page=new e(t,r,u)}setMessagePort(t){this.page.setMessagePort(t)}setViewport(t,e){this.viewport==t&&this.insets==e||(this.viewport=t,this.insets=e,this.layout())}setFit(t){this.fit!=t&&(this.fit=t,this.layout())}loadResource(t){this.page.hide(),this.page.loadPage(t)}onIframeLoaded(){this.page.size&&this.layout()}layout(){if(!this.page.size||!this.viewport)return;const t={top:this.insets.top,right:this.insets.right,bottom:this.insets.bottom,left:this.insets.left};this.page.setMargins(t);const e={width:this.viewport.width-this.insets.left-this.insets.right,height:this.viewport.height-this.insets.top-this.insets.bottom},r=function(t,e,r){switch(t){case"contain":return function(t,e){const r=e.width/t.width,n=e.height/t.height;return Math.min(r,n)}(e,r);case"width":return function(t,e){return e.width/t.width}(e,r);case"height":return function(t,e){return e.height/t.height}(e,r)}}(this.fit,this.page.size,e);this.metaViewport.content=(new n).setInitialScale(r).setMinimumScale(r).setWidth(this.page.size.width).setHeight(this.page.size.height).build(),this.scale=r,this.page.show(),this.listener.onLayout()}}class u{setMessagePort(t){this.messagePort=t}registerTemplates(t){this.send({kind:"registerTemplates",templates:t})}addDecoration(t,e){this.send({kind:"addDecoration",decoration:t,group:e})}removeDecoration(t,e){this.send({kind:"removeDecoration",id:t,group:e})}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}var c,l;!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(c||(c={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(l||(l={}));var f=r(5155);r.n(f)().shim();class p{constructor(t){this.selectionListener=t}setMessagePort(t){this.messagePort=t,t.onmessage=t=>{this.onFeedback(t.data)}}requestSelection(t){this.send({kind:"requestSelection",requestId:t})}clearSelection(){this.send({kind:"clearSelection"})}onFeedback(t){if("selectionAvailable"===t.kind)return this.onSelectionAvailable(t.requestId,t.selection)}onSelectionAvailable(t,e){this.selectionListener.onSelectionAvailable(t,e)}send(t){var e;null===(e=this.messagePort)||void 0===e||e.postMessage(t)}}const y=document.getElementById("page"),h=document.querySelector("meta[name=viewport]");window.singleArea=new class{constructor(e,r,n,o,i){const a=new t(e,o,i);this.manager=new s(e,r,n,a)}setMessagePort(t){this.manager.setMessagePort(t)}loadResource(t){this.manager.loadResource(t)}setViewport(t,e,r,n,o,i){const a={width:t,height:e},s={top:r,left:i,bottom:o,right:n};this.manager.setViewport(a,s)}setFit(t){if("contain"!=t&&"width"!=t&&"height"!=t)throw Error(`Invalid fit value: ${t}`);this.manager.setFit(t)}}(window,y,h,window.gestures,window.documentState),window.singleSelection=new class{constructor(t,e){this.iframe=t,this.listener=e;const r={onSelectionAvailable:(t,e)=>{let r;r=e?function(t,e){const r=e.getBoundingClientRect(),n=i(t.selectionRect,r);return{selectedText:null==t?void 0:t.selectedText,selectionRect:n,textBefore:t.textBefore,textAfter:t.textAfter}}(e,this.iframe):e;const n=JSON.stringify(r);this.listener.onSelectionAvailable(t,n)}};this.wrapper=new p(r)}setMessagePort(t){this.wrapper.setMessagePort(t)}requestSelection(t){this.wrapper.requestSelection(t)}clearSelection(){this.wrapper.clearSelection()}}(y,window.singleSelectionListener),window.singleDecorations=new class{constructor(){this.wrapper=new u}setMessagePort(t){this.wrapper.setMessagePort(t)}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.wrapper.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.wrapper.addDecoration(r,e)}removeDecoration(t,e){this.wrapper.removeDecoration(t,e)}},window.singleInitialization=new class{constructor(t,e,r,n,o,i){this.window=t,this.listener=e,this.iframe=r,this.areaBridge=n,this.selectionBridge=o,this.decorationsBridge=i}loadResource(t){this.iframe.src=t,this.window.addEventListener("message",(t=>{console.log("message"),t.ports[0]&&t.source===this.iframe.contentWindow&&this.onInitMessage(t)}))}onInitMessage(t){console.log(`receiving init message ${t}`);const e=t.data,r=t.ports[0];switch(e){case"InitAreaManager":return this.initAreaManager(r);case"InitSelection":return this.initSelection(r);case"InitDecorations":return this.initDecorations(r)}}initAreaManager(t){this.areaBridge.setMessagePort(t),this.listener.onAreaApiAvailable()}initSelection(t){this.selectionBridge.setMessagePort(t),this.listener.onSelectionApiAvailable()}initDecorations(t){this.decorationsBridge.setMessagePort(t),this.listener.onDecorationApiAvailable()}}(window,window.fixedApiState,y,window.singleArea,window.singleSelection,window.singleDecorations),window.fixedApiState.onInitializationApiAvailable()}()}(); //# sourceMappingURL=fixed-single-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map index cec6c4ba65..ec003bac34 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/fixed-single-script.js.map @@ -1 +1 @@ -{"version":3,"file":"fixed-single-script.js","mappings":"qDA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+J,0BAClB,GJlC8DtY,OAAQA,OAAOuY,cAAejK,EAAQtO,OAAO4V,WAAY5V,OAAOwW,gBAAiBxW,OAAOkX,mBAC1JlX,OAAOuY,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/single-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-single.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class SingleAreaManager {\n constructor(window, iframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.scale = 1;\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n this.metaViewport = metaViewport;\n const pageListener = {\n onIframeLoaded: () => {\n this.onIframeLoaded();\n },\n onTap: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(event.rect, boundingRect);\n const shiftedEvent = {\n id: event.id,\n group: event.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.page = new PageManager(window, iframe, pageListener);\n }\n setMessagePort(messagePort) {\n this.page.setMessagePort(messagePort);\n }\n setViewport(viewport, insets) {\n if (this.viewport == viewport && this.insets == insets) {\n return;\n }\n this.viewport = viewport;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n loadResource(url) {\n this.page.hide();\n this.page.loadPage(url);\n }\n onIframeLoaded() {\n if (!this.page.size) {\n // FIXME: raise error\n }\n else {\n this.layout();\n }\n }\n layout() {\n if (!this.page.size || !this.viewport) {\n return;\n }\n const margins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.page.setMargins(margins);\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, this.page.size, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(this.page.size.width)\n .setHeight(this.page.size.height)\n .build();\n this.scale = scale;\n this.page.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedSingleAreaBridge as FixedSingleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedSingleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedSingleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedSingleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst iframe = document.getElementById(\"page\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nwindow.singleArea = new FixedSingleAreaBridge(window, iframe, metaViewport, window.gestures, window.documentState);\nwindow.singleSelection = new FixedSingleSelectionBridge(iframe, window.singleSelectionListener);\nwindow.singleDecorations = new FixedSingleDecorationsBridge();\nwindow.singleInitialization = new FixedSingleInitializationBridge(window, window.fixedApiState, iframe, window.singleArea, window.singleSelection, window.singleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","onTap","event","stringify","offset","onLinkActivated","href","outerHtml","onDecorationActivated","stringOffset","stringRect","rect","id","group","onLayout","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","data","kind","onContentSizeAvailable","URL","_a","onIframeLoaded","ViewportStringBuilder","setInitialScale","scale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","offsetToParentCoordinates","iframeRect","visualViewport","offsetLeft","offsetTop","rectToParentCoordinates","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","SingleAreaManager","metaViewport","fit","insets","clientX","clientY","pageListener","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","page","setViewport","viewport","layout","setFit","loadResource","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","registerTemplates","templates","send","addDecoration","decoration","removeDecoration","postMessage","TrimDirection","ResolveDirection","selectionListener","onFeedback","requestSelection","requestId","clearSelection","feedback","onSelectionAvailable","selection","getElementById","querySelector","singleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","singleSelection","wrapperListener","adjustedSelection","selectionRect","selectedText","textBefore","textAfter","selectionAsJson","wrapper","singleSelectionListener","singleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","singleInitialization","areaBridge","selectionBridge","decorationsBridge","console","log","ports","onInitMessage","initMessage","initAreaManager","initSelection","initDecorations","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"fixed-single-script.js","mappings":"qDAEA,IAAIA,EAAe,EAAQ,MAEvBC,EAAW,EAAQ,MAEnBC,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gBAAgB5I,eAAeC,GACpC3iB,KAAKmiB,SAAS8J,yBAClB,CACA,eAAAF,CAAgBpJ,GACZ3iB,KAAKurB,kBAAkB7I,eAAeC,GACtC3iB,KAAKmiB,SAAS+J,0BAClB,GJlC8DtY,OAAQA,OAAOuY,cAAejK,EAAQtO,OAAO4V,WAAY5V,OAAOwW,gBAAiBxW,OAAOkX,mBAC1JlX,OAAOuY,cAAcC,8B","sources":["webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/fixed/page-manager.ts","webpack://readium-js/./src/util/viewport.ts","webpack://readium-js/./src/common/geometry.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/fixed/single-area-manager.ts","webpack://readium-js/./src/fixed/fit.ts","webpack://readium-js/./src/fixed/decoration-wrapper.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/fixed/selection-wrapper.ts","webpack://readium-js/./src/index-fixed-single.ts","webpack://readium-js/./src/bridge/fixed-area-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-initialization-bridge.ts"],"sourcesContent":["'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","/** Manages a fixed layout resource embedded in an iframe. */\nexport class PageManager {\n constructor(window, iframe, listener) {\n this.margins = { top: 0, right: 0, bottom: 0, left: 0 };\n if (!iframe.contentWindow) {\n throw Error(\"Iframe argument must have been attached to DOM.\");\n }\n this.listener = listener;\n this.iframe = iframe;\n }\n setMessagePort(messagePort) {\n messagePort.onmessage = (message) => {\n this.onMessageFromIframe(message);\n };\n }\n show() {\n this.iframe.style.display = \"unset\";\n }\n hide() {\n this.iframe.style.display = \"none\";\n }\n /** Sets page margins. */\n setMargins(margins) {\n if (this.margins == margins) {\n return;\n }\n this.iframe.style.marginTop = this.margins.top + \"px\";\n this.iframe.style.marginLeft = this.margins.left + \"px\";\n this.iframe.style.marginBottom = this.margins.bottom + \"px\";\n this.iframe.style.marginRight = this.margins.right + \"px\";\n }\n /** Loads page content. */\n loadPage(url) {\n this.iframe.src = url;\n }\n /** Sets the size of this page without content. */\n setPlaceholder(size) {\n this.iframe.style.visibility = \"hidden\";\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n }\n onMessageFromIframe(event) {\n const message = event.data;\n switch (message.kind) {\n case \"contentSize\":\n return this.onContentSizeAvailable(message.size);\n case \"tap\":\n return this.listener.onTap(message.event);\n case \"linkActivated\":\n return this.onLinkActivated(message);\n case \"decorationActivated\":\n return this.listener.onDecorationActivated(message.event);\n }\n }\n onLinkActivated(message) {\n try {\n const url = new URL(message.href, this.iframe.src);\n this.listener.onLinkActivated(url.toString(), message.outerHtml);\n }\n catch (_a) {\n // Do nothing if url is not valid.\n }\n }\n onContentSizeAvailable(size) {\n if (!size) {\n //FIXME: handle edge case\n return;\n }\n this.iframe.style.width = size.width + \"px\";\n this.iframe.style.height = size.height + \"px\";\n this.size = size;\n this.listener.onIframeLoaded();\n }\n}\n","export class ViewportStringBuilder {\n setInitialScale(scale) {\n this.initialScale = scale;\n return this;\n }\n setMinimumScale(scale) {\n this.minimumScale = scale;\n return this;\n }\n setWidth(width) {\n this.width = width;\n return this;\n }\n setHeight(height) {\n this.height = height;\n return this;\n }\n build() {\n const components = [];\n if (this.initialScale) {\n components.push(\"initial-scale=\" + this.initialScale);\n }\n if (this.minimumScale) {\n components.push(\"minimum-scale=\" + this.minimumScale);\n }\n if (this.width) {\n components.push(\"width=\" + this.width);\n }\n if (this.height) {\n components.push(\"height=\" + this.height);\n }\n return components.join(\", \");\n }\n}\nexport function parseViewportString(viewportString) {\n const regex = /(\\w+) *= *([^\\s,]+)/g;\n const properties = new Map();\n let match;\n while ((match = regex.exec(viewportString))) {\n if (match != null) {\n properties.set(match[1], match[2]);\n }\n }\n const width = parseFloat(properties.get(\"width\"));\n const height = parseFloat(properties.get(\"height\"));\n if (width && height) {\n return { width, height };\n }\n else {\n return undefined;\n }\n}\n","export function offsetToParentCoordinates(offset, iframeRect) {\n return {\n x: (offset.x + iframeRect.left - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (offset.y + iframeRect.top - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n}\nexport function rectToParentCoordinates(rect, iframeRect) {\n const topLeft = { x: rect.left, y: rect.top };\n const bottomRight = { x: rect.right, y: rect.bottom };\n const shiftedTopLeft = offsetToParentCoordinates(topLeft, iframeRect);\n const shiftedBottomRight = offsetToParentCoordinates(bottomRight, iframeRect);\n return {\n left: shiftedTopLeft.x,\n top: shiftedTopLeft.y,\n right: shiftedBottomRight.x,\n bottom: shiftedBottomRight.y,\n width: shiftedBottomRight.x - shiftedTopLeft.x,\n height: shiftedBottomRight.y - shiftedTopLeft.y,\n };\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n return;\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","import { computeScale } from \"./fit\";\nimport { PageManager } from \"./page-manager\";\nimport { ViewportStringBuilder } from \"../util/viewport\";\nimport { offsetToParentCoordinates } from \"../common/geometry\";\nimport { rectToParentCoordinates } from \"../common/geometry\";\nimport { GesturesDetector } from \"../common/gestures\";\nexport class SingleAreaManager {\n constructor(window, iframe, metaViewport, listener) {\n this.fit = \"contain\";\n this.insets = { top: 0, right: 0, bottom: 0, left: 0 };\n this.scale = 1;\n this.listener = listener;\n const wrapperGesturesListener = {\n onTap: (event) => {\n const offset = {\n x: (event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n listener.onTap({ offset: offset });\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkActivated: (_) => {\n throw Error(\"No interactive element in the root document.\");\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (_) => {\n throw Error(\"No decoration in the root document.\");\n },\n };\n new GesturesDetector(window, wrapperGesturesListener);\n this.metaViewport = metaViewport;\n const pageListener = {\n onIframeLoaded: () => {\n this.onIframeLoaded();\n },\n onTap: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n listener.onTap({ offset: shiftedOffset });\n },\n onLinkActivated: (href, outerHtml) => {\n listener.onLinkActivated(href, outerHtml);\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDecorationActivated: (event) => {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedOffset = offsetToParentCoordinates(event.offset, boundingRect);\n const shiftedRect = rectToParentCoordinates(event.rect, boundingRect);\n const shiftedEvent = {\n id: event.id,\n group: event.group,\n rect: shiftedRect,\n offset: shiftedOffset,\n };\n listener.onDecorationActivated(shiftedEvent);\n },\n };\n this.page = new PageManager(window, iframe, pageListener);\n }\n setMessagePort(messagePort) {\n this.page.setMessagePort(messagePort);\n }\n setViewport(viewport, insets) {\n if (this.viewport == viewport && this.insets == insets) {\n return;\n }\n this.viewport = viewport;\n this.insets = insets;\n this.layout();\n }\n setFit(fit) {\n if (this.fit == fit) {\n return;\n }\n this.fit = fit;\n this.layout();\n }\n loadResource(url) {\n this.page.hide();\n this.page.loadPage(url);\n }\n onIframeLoaded() {\n if (!this.page.size) {\n // FIXME: raise error\n }\n else {\n this.layout();\n }\n }\n layout() {\n if (!this.page.size || !this.viewport) {\n return;\n }\n const margins = {\n top: this.insets.top,\n right: this.insets.right,\n bottom: this.insets.bottom,\n left: this.insets.left,\n };\n this.page.setMargins(margins);\n const safeDrawingSize = {\n width: this.viewport.width - this.insets.left - this.insets.right,\n height: this.viewport.height - this.insets.top - this.insets.bottom,\n };\n const scale = computeScale(this.fit, this.page.size, safeDrawingSize);\n this.metaViewport.content = new ViewportStringBuilder()\n .setInitialScale(scale)\n .setMinimumScale(scale)\n .setWidth(this.page.size.width)\n .setHeight(this.page.size.height)\n .build();\n this.scale = scale;\n this.page.show();\n this.listener.onLayout();\n }\n}\n","export function computeScale(fit, content, container) {\n switch (fit) {\n case \"contain\":\n return fitContain(content, container);\n case \"width\":\n return fitWidth(content, container);\n case \"height\":\n return fitHeight(content, container);\n }\n}\nfunction fitContain(content, container) {\n const widthRatio = container.width / content.width;\n const heightRatio = container.height / content.height;\n return Math.min(widthRatio, heightRatio);\n}\nfunction fitWidth(content, container) {\n return container.width / content.width;\n}\nfunction fitHeight(content, container) {\n return container.height / content.height;\n}\n","export class DecorationWrapperParentSide {\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n }\n registerTemplates(templates) {\n this.send({ kind: \"registerTemplates\", templates });\n }\n addDecoration(decoration, group) {\n this.send({ kind: \"addDecoration\", decoration, group });\n }\n removeDecoration(id, group) {\n this.send({ kind: \"removeDecoration\", id, group });\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class DecorationWrapperIframeSide {\n constructor(messagePort, decorationManager) {\n this.decorationManager = decorationManager;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"registerTemplates\":\n return this.registerTemplates(command.templates);\n case \"addDecoration\":\n return this.addDecoration(command.decoration, command.group);\n case \"removeDecoration\":\n return this.removeDecoration(command.id, command.group);\n }\n }\n registerTemplates(templates) {\n this.decorationManager.registerTemplates(templates);\n }\n addDecoration(decoration, group) {\n this.decorationManager.addDecoration(decoration, group);\n }\n removeDecoration(id, group) {\n this.decorationManager.removeDecoration(id, group);\n }\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","export class SelectionWrapperParentSide {\n constructor(listener) {\n this.selectionListener = listener;\n }\n setMessagePort(messagePort) {\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onFeedback(message.data);\n };\n }\n requestSelection(requestId) {\n this.send({ kind: \"requestSelection\", requestId: requestId });\n }\n clearSelection() {\n this.send({ kind: \"clearSelection\" });\n }\n onFeedback(feedback) {\n switch (feedback.kind) {\n case \"selectionAvailable\":\n return this.onSelectionAvailable(feedback.requestId, feedback.selection);\n }\n }\n onSelectionAvailable(requestId, selection) {\n this.selectionListener.onSelectionAvailable(requestId, selection);\n }\n send(message) {\n var _a;\n (_a = this.messagePort) === null || _a === void 0 ? void 0 : _a.postMessage(message);\n }\n}\nexport class SelectionWrapperIframeSide {\n constructor(messagePort, manager) {\n this.selectionManager = manager;\n this.messagePort = messagePort;\n messagePort.onmessage = (message) => {\n this.onCommand(message.data);\n };\n }\n onCommand(command) {\n switch (command.kind) {\n case \"requestSelection\":\n return this.onRequestSelection(command.requestId);\n case \"clearSelection\":\n return this.onClearSelection();\n }\n }\n onRequestSelection(requestId) {\n const selection = this.selectionManager.getCurrentSelection();\n const feedback = {\n kind: \"selectionAvailable\",\n requestId: requestId,\n selection: selection,\n };\n this.sendFeedback(feedback);\n }\n onClearSelection() {\n this.selectionManager.clearSelection();\n }\n sendFeedback(message) {\n this.messagePort.postMessage(message);\n }\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { FixedSingleAreaBridge as FixedSingleAreaBridge } from \"./bridge/fixed-area-bridge\";\nimport { FixedSingleDecorationsBridge } from \"./bridge/all-decoration-bridge\";\nimport { FixedSingleSelectionBridge } from \"./bridge/all-selection-bridge\";\nimport { FixedSingleInitializationBridge, } from \"./bridge/all-initialization-bridge\";\nconst iframe = document.getElementById(\"page\");\nconst metaViewport = document.querySelector(\"meta[name=viewport]\");\nwindow.singleArea = new FixedSingleAreaBridge(window, iframe, metaViewport, window.gestures, window.documentState);\nwindow.singleSelection = new FixedSingleSelectionBridge(iframe, window.singleSelectionListener);\nwindow.singleDecorations = new FixedSingleDecorationsBridge();\nwindow.singleInitialization = new FixedSingleInitializationBridge(window, window.fixedApiState, iframe, window.singleArea, window.singleSelection, window.singleDecorations);\nwindow.fixedApiState.onInitializationApiAvailable();\n","import { DoubleAreaManager } from \"../fixed/double-area-manager\";\nimport { FixedListenerAdapter, } from \"./all-listener-bridge\";\nimport { SingleAreaManager } from \"../fixed/single-area-manager\";\nexport class FixedSingleAreaBridge {\n constructor(window, iframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new SingleAreaManager(window, iframe, metaViewport, listener);\n }\n setMessagePort(messagePort) {\n this.manager.setMessagePort(messagePort);\n }\n loadResource(url) {\n this.manager.loadResource(url);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\nexport class FixedDoubleAreaBridge {\n constructor(window, leftIframe, rightIframe, metaViewport, gesturesBridge, documentBridge) {\n const listener = new FixedListenerAdapter(window, gesturesBridge, documentBridge);\n this.manager = new DoubleAreaManager(window, leftIframe, rightIframe, metaViewport, listener);\n }\n setLeftMessagePort(messagePort) {\n this.manager.setLeftMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.manager.setRightMessagePort(messagePort);\n }\n loadSpread(spread) {\n this.manager.loadSpread(spread);\n }\n setViewport(viewporttWidth, viewportHeight, insetTop, insetRight, insetBottom, insetLeft) {\n const viewport = { width: viewporttWidth, height: viewportHeight };\n const insets = {\n top: insetTop,\n left: insetLeft,\n bottom: insetBottom,\n right: insetRight,\n };\n this.manager.setViewport(viewport, insets);\n }\n setFit(fit) {\n if (fit != \"contain\" && fit != \"width\" && fit != \"height\") {\n throw Error(`Invalid fit value: ${fit}`);\n }\n this.manager.setFit(fit);\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","import { DecorationWrapperIframeSide } from \"../fixed/decoration-wrapper\";\nimport { IframeMessageSender } from \"../fixed/iframe-message\";\nimport { SelectionWrapperIframeSide } from \"../fixed/selection-wrapper\";\nexport class FixedSingleInitializationBridge {\n constructor(window, listener, iframe, areaBridge, selectionBridge, decorationsBridge) {\n this.window = window;\n this.listener = listener;\n this.iframe = iframe;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n }\n loadResource(url) {\n this.iframe.src = url;\n this.window.addEventListener(\"message\", (event) => {\n console.log(\"message\");\n if (!event.ports[0]) {\n return;\n }\n if (event.source === this.iframe.contentWindow) {\n this.onInitMessage(event);\n }\n });\n }\n onInitMessage(event) {\n console.log(`receiving init message ${event}`);\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n return this.initAreaManager(messagePort);\n case \"InitSelection\":\n return this.initSelection(messagePort);\n case \"InitDecorations\":\n return this.initDecorations(messagePort);\n }\n }\n initAreaManager(messagePort) {\n this.areaBridge.setMessagePort(messagePort);\n this.listener.onAreaApiAvailable();\n }\n initSelection(messagePort) {\n this.selectionBridge.setMessagePort(messagePort);\n this.listener.onSelectionApiAvailable();\n }\n initDecorations(messagePort) {\n this.decorationsBridge.setMessagePort(messagePort);\n this.listener.onDecorationApiAvailable();\n }\n}\nexport class FixedDoubleInitializationBridge {\n constructor(window, listener, leftIframe, rightIframe, areaBridge, selectionBridge, decorationsBridge) {\n this.areaReadySemaphore = 2;\n this.selectionReadySemaphore = 2;\n this.decorationReadySemaphore = 2;\n this.listener = listener;\n this.areaBridge = areaBridge;\n this.selectionBridge = selectionBridge;\n this.decorationsBridge = decorationsBridge;\n window.addEventListener(\"message\", (event) => {\n if (!event.ports[0]) {\n return;\n }\n if (event.source === leftIframe.contentWindow) {\n this.onInitMessageLeft(event);\n }\n else if (event.source == rightIframe.contentWindow) {\n this.onInitMessageRight(event);\n }\n });\n }\n loadSpread(spread) {\n const pageNb = (spread.left ? 1 : 0) + (spread.right ? 1 : 0);\n this.areaReadySemaphore = pageNb;\n this.selectionReadySemaphore = pageNb;\n this.decorationReadySemaphore = pageNb;\n this.areaBridge.loadSpread(spread);\n }\n onInitMessageLeft(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setLeftMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setLeftMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setLeftMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitMessageRight(event) {\n const initMessage = event.data;\n const messagePort = event.ports[0];\n switch (initMessage) {\n case \"InitAreaManager\":\n this.areaBridge.setRightMessagePort(messagePort);\n this.onInitAreaMessage();\n break;\n case \"InitSelection\":\n this.selectionBridge.setRightMessagePort(messagePort);\n this.onInitSelectionMessage();\n break;\n case \"InitDecorations\":\n this.decorationsBridge.setRightMessagePort(messagePort);\n this.onInitDecorationMessage();\n break;\n }\n }\n onInitAreaMessage() {\n this.areaReadySemaphore -= 1;\n if (this.areaReadySemaphore == 0) {\n this.listener.onAreaApiAvailable();\n }\n }\n onInitSelectionMessage() {\n this.selectionReadySemaphore -= 1;\n if (this.selectionReadySemaphore == 0) {\n this.listener.onSelectionApiAvailable();\n }\n }\n onInitDecorationMessage() {\n this.decorationReadySemaphore -= 1;\n if (this.decorationReadySemaphore == 0) {\n this.listener.onDecorationApiAvailable();\n }\n }\n}\nexport class FixedInitializerIframeSide {\n constructor(window) {\n this.window = window;\n }\n initAreaManager() {\n const messagePort = this.initChannel(\"InitAreaManager\");\n return new IframeMessageSender(messagePort);\n }\n initSelection(selectionManager) {\n const messagePort = this.initChannel(\"InitSelection\");\n new SelectionWrapperIframeSide(messagePort, selectionManager);\n }\n initDecorations(decorationManager) {\n const messagePort = this.initChannel(\"InitDecorations\");\n new DecorationWrapperIframeSide(messagePort, decorationManager);\n }\n initChannel(initMessage) {\n const messageChannel = new MessageChannel();\n this.window.parent.postMessage(initMessage, \"*\", [messageChannel.port2]);\n return messageChannel.port1;\n }\n}\n"],"names":["GetIntrinsic","callBind","$indexOf","module","exports","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","length","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","map","predicates","props","getOwnPropertySymbols","i","hasToStringTag","has","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","P","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","slice","that","target","this","bound","args","boundLength","Math","max","boundArgs","push","Function","join","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","get","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","Map","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","set","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","s","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","m","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","c","n","charCodeAt","type","size","entries","lineJoiner","isArr","symMap","k","j","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","y","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","charCode","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","gesturesApi","documentApi","resizeObserverAdded","documentLoadedFired","onTap","event","stringify","offset","onLinkActivated","href","outerHtml","onDecorationActivated","stringOffset","stringRect","rect","id","group","onLayout","ResizeObserver","requestAnimationFrame","scrollingElement","scrollHeight","scrollWidth","onDocumentLoadedAndSized","onDocumentResized","observe","body","PageManager","iframe","listener","margins","top","right","bottom","left","contentWindow","setMessagePort","messagePort","onmessage","message","onMessageFromIframe","show","style","display","hide","setMargins","marginTop","marginLeft","marginBottom","marginRight","loadPage","url","src","setPlaceholder","visibility","width","height","data","kind","onContentSizeAvailable","URL","_a","onIframeLoaded","ViewportStringBuilder","setInitialScale","scale","initialScale","setMinimumScale","minimumScale","setWidth","setHeight","build","components","offsetToParentCoordinates","iframeRect","visualViewport","offsetLeft","offsetTop","rectToParentCoordinates","topLeft","bottomRight","shiftedTopLeft","shiftedBottomRight","GesturesDetector","decorationManager","addEventListener","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","outerHTML","stopPropagation","preventDefault","handleDecorationClickEvent","element","hasAttribute","parentElement","SingleAreaManager","metaViewport","fit","insets","clientX","clientY","pageListener","boundingRect","getBoundingClientRect","shiftedOffset","shiftedRect","shiftedEvent","page","setViewport","viewport","layout","setFit","loadResource","safeDrawingSize","content","container","widthRatio","heightRatio","min","fitContain","fitWidth","fitHeight","computeScale","registerTemplates","templates","send","addDecoration","decoration","removeDecoration","postMessage","TrimDirection","ResolveDirection","selectionListener","onFeedback","requestSelection","requestId","clearSelection","feedback","onSelectionAvailable","selection","getElementById","querySelector","singleArea","gesturesBridge","documentBridge","manager","viewporttWidth","viewportHeight","insetTop","insetRight","insetBottom","insetLeft","gestures","documentState","singleSelection","wrapperListener","adjustedSelection","selectionRect","selectedText","textBefore","textAfter","selectionAsJson","wrapper","singleSelectionListener","singleDecorations","actualTemplates","parse","parseTemplates","actualDecoration","parseDecoration","singleInitialization","areaBridge","selectionBridge","decorationsBridge","console","log","ports","onInitMessage","initMessage","initAreaManager","initSelection","initDecorations","onAreaApiAvailable","onSelectionApiAvailable","onDecorationApiAvailable","fixedApiState","onInitializationApiAvailable"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index c0c22bb594..8cefd57064 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?M(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?M(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,d=u?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,m=(u?d:h)/g;function b(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${m}px`;const r=Math.floor(e.top/m)*m;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${m}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/m)*m;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,b(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;if(e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e){if(!(e instanceof HTMLAnchorElement))return;this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()}r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t)}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class ${constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?M(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?M(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,d=u?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,m=(u?d:h)/g;function b(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${m}px`;const r=Math.floor(e.top/m)*m;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${m}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/m)*m;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,b(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e?e instanceof HTMLAnchorElement&&(this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()):(r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t))}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class ${constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index 3cac44a9ce..1e0a708c84 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,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hB,OAAOrK,UAC9CxI,KAAKqwB,SAASyH,oBACd93B,KAAK6S,OAAO2f,UAAY,IAAIiC,EAA0B5hB,OAAQ,IAAI+e,EAAiB/e,SACnF7S,KAAKqwB,SAAS0H,0BACd/3B,KAAK6S,OAAOmlB,YAAc,IAAI3E,EAA4BxgB,OAAQyd,GAClEtwB,KAAKqwB,SAAS4H,2BACd,IAAI7H,EAAiBvd,OAAQ6kB,EAAgBpH,GAC7C,IAAIe,EAAkBxe,OAAQ6kB,EAClC,CAEA,aAAAJ,GACIt3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMsO,EAAO1vB,SAASmiB,cAAc,QACpCuN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B/2B,KAAK6S,OAAOrK,SAAS2vB,KAAKrN,YAAYoN,EAAK,GAEnD,GFIsBrlB,OAAQA,OAAOulB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n else {\n return;\n }\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GAAK,EAEvCxB,EAAM,CACNK,EAAG,IAAIsB,YAAYF,EAAO,GAC1BlB,EAAG,IAAIoB,YAAYF,EAAO,GA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I7H,EAAiBvd,OAAQ6kB,EAAgBpH,GAC7C,IAAIe,EAAkBxe,OAAQ6kB,EAClC,CAEA,aAAAJ,GACIt3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMsO,EAAO1vB,SAASmiB,cAAc,QACpCuN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B/2B,KAAK6S,OAAOrK,SAAS2vB,KAAKrN,YAAYoN,EAAK,GAEnD,GFIsBrlB,OAAQA,OAAOulB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n return;\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file From b1bba9c260e3b3ffac6db70abf76a3195b7af552 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 30 Jan 2026 07:19:14 +0100 Subject: [PATCH 42/56] Fix #745 to enable update to Compose 1.10 --- .../internals/webview/ComposableWebView.kt | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/ComposableWebView.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/ComposableWebView.kt index 999b297617..e5dad4ff1c 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/ComposableWebView.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/ComposableWebView.kt @@ -13,10 +13,8 @@ import android.webkit.WebChromeClient import android.webkit.WebView import android.webkit.WebViewClient import android.widget.FrameLayout -import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.lazy.LazyRow import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.Stable @@ -25,7 +23,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshotFlow -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.viewinterop.AndroidView @@ -118,25 +115,16 @@ public fun WebView( height ) - LazyRow( - horizontalArrangement = Arrangement.Center, - verticalAlignment = Alignment.CenterVertically, - userScrollEnabled = false, - modifier = Modifier.fillMaxSize() - ) { - item { - WebView( - state, - factory, - layoutParams, - Modifier.fillParentMaxSize(), - onCreated, - onDispose, - client, - chromeClient, - ) - } - } + WebView( + state, + factory, + layoutParams, + Modifier.fillMaxSize(), + onCreated, + onDispose, + client, + chromeClient, + ) } } From 8fec056cdbaa5639bbebd78eadf3663303bcee46 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Mon, 2 Feb 2026 18:06:24 +0100 Subject: [PATCH 43/56] Introduce owned MutatorMutex in navigation delegates --- .../web/fixedlayout/FixedWebRenditionState.kt | 49 +++---- .../reflowable/ReflowableWebRenditionState.kt | 121 ++++++++---------- 2 files changed, 83 insertions(+), 87 deletions(-) diff --git a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt index 1eedacf5ea..aa78ccb9ae 100644 --- a/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt +++ b/readium/navigators/web/fixedlayout/src/main/kotlin/org/readium/navigator/web/fixedlayout/FixedWebRenditionState.kt @@ -10,6 +10,7 @@ package org.readium.navigator.web.fixedlayout import android.app.Application import androidx.compose.foundation.MutatePriority +import androidx.compose.foundation.MutatorMutex import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.MutableState import androidx.compose.runtime.Stable @@ -21,10 +22,10 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap -import kotlin.coroutines.cancellation.CancellationException import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentMapOf +import kotlinx.coroutines.coroutineScope import org.readium.navigator.common.DecorationController import org.readium.navigator.common.NavigationController import org.readium.navigator.common.Overflow @@ -240,6 +241,9 @@ internal class FixedNavigationDelegate( initialLocation: FixedWebLocation, ) : NavigationController, OverflowController { + private val navigationMutex: MutatorMutex = + MutatorMutex() + private val locationMutable: MutableState = mutableStateOf(initialLocation) @@ -255,13 +259,18 @@ internal class FixedNavigationDelegate( } override suspend fun goTo(location: FixedWebGoLocation) { - val pagerStateNow = pagerState.value + coroutineScope { + navigationMutex.mutateWith( + receiver = this, + priority = MutatePriority.UserInput + ) { + val pagerStateNow = pagerState.value - pagerStateNow.scroll(MutatePriority.UserInput) { - val spreadIndex = layout.value.spreadIndexForHref(location.href) - ?: return@scroll + val spreadIndex = layout.value.spreadIndexForHref(location.href) + ?: return@mutateWith - pagerStateNow.requestScrollToPage(spreadIndex) + pagerStateNow.scrollToPage(spreadIndex) + } } } @@ -276,29 +285,25 @@ internal class FixedNavigationDelegate( get() = pagerState.value.currentPage > 0 override suspend fun moveForward() { - val pagerStateNow = pagerState.value - - if (pagerStateNow.isScrollInProgress) { - throw CancellationException() - } + coroutineScope { + navigationMutex.tryMutate { + val pagerStateNow = pagerState.value - pagerStateNow.scroll { - if (canMoveForward) { - pagerStateNow.requestScrollToPage(pagerStateNow.currentPage + 1) + if (canMoveForward) { + pagerStateNow.scrollToPage(pagerStateNow.currentPage + 1) + } } } } override suspend fun moveBackward() { - val pagerStateNow = pagerState.value - - if (pagerStateNow.isScrollInProgress) { - throw CancellationException() - } + coroutineScope { + navigationMutex.tryMutate { + val pagerStateNow = pagerState.value - pagerStateNow.scroll { - if (canMoveBackward) { - pagerStateNow.requestScrollToPage(pagerStateNow.currentPage - 1) + if (canMoveBackward) { + pagerStateNow.scrollToPage(pagerStateNow.currentPage - 1) + } } } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 904038a47a..c684aec4b4 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -10,6 +10,7 @@ package org.readium.navigator.web.reflowable import android.app.Application import androidx.compose.foundation.MutatePriority +import androidx.compose.foundation.MutatorMutex import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.pager.PagerState import androidx.compose.runtime.MutableState @@ -22,13 +23,13 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.unit.DpSize -import kotlin.coroutines.cancellation.CancellationException import kotlin.coroutines.suspendCoroutine import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentMapOf import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.withContext import org.readium.navigator.common.DecorationController import org.readium.navigator.common.HtmlId @@ -183,12 +184,6 @@ public class ReflowableWebRenditionState internal constructor( WebViewClient(webViewServer) } - internal val goDelegate = GoDelegate( - readingOrder = publication.readingOrder, - resourceStates = resourceStates, - pagerState = pagerState - ) - internal lateinit var navigationDelegate: ReflowableNavigationDelegate internal fun updateLocation() { @@ -245,7 +240,6 @@ public class ReflowableWebRenditionState internal constructor( internal fun initController(location: ReflowableWebLocation, viewport: ReflowableWebViewport) { navigationDelegate = ReflowableNavigationDelegate( - goDelegate, publication, resourceStates, pagerState, @@ -263,39 +257,6 @@ public class ReflowableWebRenditionState internal constructor( } } -internal class GoDelegate( - private val readingOrder: ReflowableWebPublication.ReadingOrder, - private val resourceStates: List, - private val pagerState: PagerState, -) { - internal suspend fun goTo(location: ReflowableWebGoLocation) { - withContext(Dispatchers.Main) { - pagerState.scroll(MutatePriority.UserInput) { - val destIndex = readingOrder.indexOfHref(location.href) ?: return@scroll - val destLocationByResource = location.toResourceLocations(destIndex, readingOrder) - Timber.d("destByResource $destLocationByResource") - - try { - pagerState.requestScrollToPage(destIndex) - - suspendCoroutine { continuation -> - resourceStates.zip(destLocationByResource).forEach { (state, location) -> - state.go( - location = location, - continuation = continuation.takeIf { state === resourceStates[destIndex] } - ) - } - } - } finally { - resourceStates.zip(destLocationByResource).forEach { (state, location) -> - state.cancelPendingLocation(location) - } - } - } - } - } -} - @ExperimentalReadiumApi @Stable public class ReflowableWebRenditionController internal constructor( @@ -380,7 +341,6 @@ internal class ReflowableLayoutDelegate( @OptIn(ExperimentalReadiumApi::class, InternalReadiumApi::class) internal class ReflowableNavigationDelegate( - private val goDelegate: GoDelegate, private val publication: ReflowableWebPublication, private val resourceStates: List, private val pagerState: PagerState, @@ -389,6 +349,9 @@ internal class ReflowableNavigationDelegate( initialViewport: ReflowableWebViewport, ) : NavigationController, OverflowController { + private val navigatorMutex: MutatorMutex = + MutatorMutex() + private val locationMutable: MutableState = mutableStateOf(initialLocation) @@ -415,7 +378,37 @@ internal class ReflowableNavigationDelegate( } override suspend fun goTo(location: ReflowableWebGoLocation) { - goDelegate.goTo(location) + coroutineScope { + navigatorMutex.mutateWith( + receiver = this, + priority = MutatePriority.UserInput + ) { + withContext(Dispatchers.Main) { + val destIndex = publication.readingOrder.indexOfHref(location.href) ?: return@withContext + val destLocationByResource = location.toResourceLocations(destIndex, publication.readingOrder) + Timber.d("destByResource $destLocationByResource") + + try { + pagerState.scrollToPage(destIndex) + + suspendCoroutine { continuation -> + resourceStates.zip(destLocationByResource) + .forEach { (state, location) -> + state.go( + location = location, + continuation = continuation.takeIf { state === resourceStates[destIndex] } + ) + } + } + } finally { + resourceStates.zip(destLocationByResource) + .forEach { (state, location) -> + state.cancelPendingLocation(location) + } + } + } + } + } } override suspend fun goTo(location: ReflowableWebLocation) { @@ -440,33 +433,31 @@ internal class ReflowableNavigationDelegate( } override suspend fun moveForward() { - if (pagerState.isScrollInProgress) { - throw CancellationException() - } - - pagerState.scroll { - val currentResourceState = resourceStates[pagerState.currentPage] - val scrollController = currentResourceState.scrollController.value ?: return@scroll - if (scrollController.canMoveForward()) { - scrollController.moveForward() - } else if (pagerState.currentPage < publication.readingOrder.items.size - 1) { - pagerState.requestScrollToPage(pagerState.currentPage + 1) + coroutineScope { + navigatorMutex.tryMutate { + val currentResourceState = resourceStates[pagerState.currentPage] + val scrollController = + currentResourceState.scrollController.value ?: return@tryMutate + if (scrollController.canMoveForward()) { + scrollController.moveForward() + } else if (pagerState.currentPage < publication.readingOrder.items.size - 1) { + pagerState.scrollToPage(pagerState.currentPage + 1) + } } } } override suspend fun moveBackward() { - if (pagerState.isScrollInProgress) { - throw CancellationException() - } - - pagerState.scroll { - val currentResourceState = resourceStates[pagerState.currentPage] - val scrollController = currentResourceState.scrollController.value ?: return@scroll - if (scrollController.canMoveBackward()) { - scrollController.moveBackward() - } else if (pagerState.currentPage > 0) { - pagerState.requestScrollToPage(pagerState.currentPage - 1) + coroutineScope { + navigatorMutex.tryMutate { + val currentResourceState = resourceStates[pagerState.currentPage] + val scrollController = + currentResourceState.scrollController.value ?: return@tryMutate + if (scrollController.canMoveBackward()) { + scrollController.moveBackward() + } else if (pagerState.currentPage > 0) { + pagerState.scrollToPage(pagerState.currentPage - 1) + } } } } From 30ef22021c8abdd7dda4b5e1450e52fa575569be Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 3 Feb 2026 11:36:54 +0100 Subject: [PATCH 44/56] Fix bug --- .../navigator/web/reflowable/ReflowableWebRenditionState.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index c684aec4b4..7fb080611a 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -400,7 +400,7 @@ internal class ReflowableNavigationDelegate( ) } } - } finally { + } catch (_: Exception) { resourceStates.zip(destLocationByResource) .forEach { (state, location) -> state.cancelPendingLocation(location) From 5ce1eed38632f8cb3f4e67eb29cea4b16cf59c09 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 3 Feb 2026 11:37:45 +0100 Subject: [PATCH 45/56] Downgrade to Compose 1.9.5 --- gradle/libs.versions.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e4dd7ff4b9..ba3c3b4a8f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,13 +10,13 @@ androidx-annotation = "1.9.1" androidx-appcompat = "1.7.1" androidx-browser = "1.9.0" androidx-cardview = "1.0.0" -androidx-compose-animation = "1.10.0" -androidx-compose-foundation = "1.10.0" -androidx-compose-material = "1.10.0" +androidx-compose-animation = "1.9.5" +androidx-compose-foundation = "1.9.5" +androidx-compose-material = "1.9.5" androidx-compose-material-icons = "1.7.8" androidx-compose-material3 = "1.4.0" -androidx-compose-runtime = "1.10.0" -androidx-compose-ui = "1.10.0" +androidx-compose-runtime = "1.9.5" +androidx-compose-ui = "1.9.5" androidx-constraintlayout = "2.2.1" androidx-core = "1.17.0" androidx-datastore = "1.2.0" From d1c267f3908706cb708efc5d1f657d18c65fb08b Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Wed, 4 Feb 2026 20:08:20 +0100 Subject: [PATCH 46/56] Various changes --- .../src/main/assets/_scripts/src/gestures.js | 6 -- .../assets/readium/scripts/readium-fixed.js | 2 +- .../readium/scripts/readium-reflowable.js | 2 +- .../navigator/common/LocationElements.kt | 5 +- .../webview/WebViewScrollController.kt | 2 - .../reflowable/ReflowableWebRenditionState.kt | 4 +- .../web/reflowable/layout/LayoutConstants.kt | 6 ++ .../reflowable/resource/ReflowableResource.kt | 69 ++++++++----------- 8 files changed, 42 insertions(+), 54 deletions(-) diff --git a/readium/navigator/src/main/assets/_scripts/src/gestures.js b/readium/navigator/src/main/assets/_scripts/src/gestures.js index 9ce99cf1c9..21dcb3b9ce 100644 --- a/readium/navigator/src/main/assets/_scripts/src/gestures.js +++ b/readium/navigator/src/main/assets/_scripts/src/gestures.js @@ -13,12 +13,6 @@ window.addEventListener("DOMContentLoaded", function () { }); function onClick(event) { - console.log( - `selectionType ${window.getSelection().type} isCollapsed ${ - window.getSelection().isCollapsed - }` - ); - if (!window.getSelection().isCollapsed) { // There's an on-going selection, the tap will dismiss it so we don't forward it. return; diff --git a/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js b/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js index 80637a9c36..bc2b8d87ff 100644 --- a/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js +++ b/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js @@ -1,2 +1,2 @@ -!function(){var u={1844:function(u,t){"use strict";function e(u){return u.split("").reverse().join("")}function r(u){return(u|-u)>>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\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]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC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-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9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00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\u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DE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\u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DC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-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73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uD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F13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\u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\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uD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D86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\u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\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC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C6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uF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-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\u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F00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-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uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uD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\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA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EB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDE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[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\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uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\u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DC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD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\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e TextAnchor( textBefore = prefix + text, - textAfter = text + textAfter = suffix ) } diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index e86a1ff953..e9e6f2bfca 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -17,7 +17,6 @@ import kotlin.math.roundToInt import org.readium.navigator.web.internals.gestures.DefaultScrollable2DState import org.readium.navigator.web.internals.gestures.Scrollable2DState import org.readium.r2.shared.ExperimentalReadiumApi -import timber.log.Timber public class WebViewScrollController( private val webView: RelaxedWebView, @@ -240,7 +239,6 @@ private fun RelaxedWebView.endProgression( orientation: Orientation, direction: LayoutDirection, ): Double { - Timber.d("endProgression $scrollX $width $maxScrollX") return when (orientation) { Orientation.Vertical -> (scrollY + height) / (maxScrollY + height).toDouble() Orientation.Horizontal -> when (direction) { diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 7fb080611a..10d0112799 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -75,7 +75,6 @@ import org.readium.r2.shared.util.RelativeUrl import org.readium.r2.shared.util.Url import org.readium.r2.shared.util.mediatype.MediaType import org.readium.r2.shared.util.resource.Resource -import timber.log.Timber /** * State holder for the rendition of a reflowable Web publication. @@ -386,7 +385,6 @@ internal class ReflowableNavigationDelegate( withContext(Dispatchers.Main) { val destIndex = publication.readingOrder.indexOfHref(location.href) ?: return@withContext val destLocationByResource = location.toResourceLocations(destIndex, publication.readingOrder) - Timber.d("destByResource $destLocationByResource") try { pagerState.scrollToPage(destIndex) @@ -400,7 +398,7 @@ internal class ReflowableNavigationDelegate( ) } } - } catch (_: Exception) { + } catch (_: Exception) { // Mainly on cancellation. resourceStates.zip(destLocationByResource) .forEach { (state, location) -> state.cancelPendingLocation(location) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt index dfd3fbcff7..e721828c64 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/layout/LayoutConstants.kt @@ -1,3 +1,9 @@ +/* + * Copyright 2026 Readium Foundation. All rights reserved. + * Use of this source code is governed by the BSD-style license + * available in the top-level LICENSE file of the project. + */ + package org.readium.navigator.web.reflowable.layout import androidx.compose.ui.unit.dp diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index 0766445efb..b7b9eb8258 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -256,40 +256,38 @@ internal fun ReflowableResource( }.onEach { pendingLocation -> pendingLocation?.let { when (pendingLocation) { - is ReflowableResourceLocation.CssSelector -> { - val offset = moveApi.getOffsetForLocation( - progression = null, - cssSelector = pendingLocation.value, - orientation = orientation + is ReflowableResourceLocation.Progression -> { + scrollController.moveToProgression( + progression = pendingLocation.value.value, + snap = !scroll, + orientation = orientation, + direction = layoutDirection ) - offset?.let { offset -> - scrollController.moveToOffset( - offset = with(density) { offset.dp.roundToPx() }, - snap = !scroll, - orientation = orientation, - ) - } } - is ReflowableResourceLocation.TextAnchor -> { - val offset = moveApi.getOffsetForLocation( - progression = null, - textAnchor = pendingLocation.value, - orientation = orientation - ) - offset?.let { offset -> - scrollController.moveToOffset( - offset = with(density) { offset.dp.roundToPx() }, - snap = !scroll, - orientation = orientation, - ) + else -> { + val offset = when (pendingLocation) { + is ReflowableResourceLocation.CssSelector -> { + moveApi.getOffsetForLocation( + progression = null, + cssSelector = pendingLocation.value, + orientation = orientation + ) + } + is ReflowableResourceLocation.TextAnchor -> { + moveApi.getOffsetForLocation( + progression = null, + textAnchor = pendingLocation.value, + orientation = orientation + ) + } + is ReflowableResourceLocation.HtmlId -> { + moveApi.getOffsetForLocation( + progression = null, + htmlId = pendingLocation.value, + orientation = orientation + ) + } } - } - is ReflowableResourceLocation.HtmlId -> { - val offset = moveApi.getOffsetForLocation( - progression = null, - htmlId = pendingLocation.value, - orientation = orientation - ) offset?.let { offset -> scrollController.moveToOffset( offset = with(density) { offset.dp.roundToPx() }, @@ -298,15 +296,6 @@ internal fun ReflowableResource( ) } } - - is ReflowableResourceLocation.Progression -> { - scrollController.moveToProgression( - progression = pendingLocation.value.value, - snap = !scroll, - orientation = orientation, - direction = layoutDirection - ) - } } resourceState.acknowledgePendingLocation( location = pendingLocation, From 68b8360b4342d6196351fb92458a5ea6ec9c470f Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 04:11:14 +0100 Subject: [PATCH 47/56] Complete update to Compose 1.10 --- gradle/libs.versions.toml | 10 +++--- .../pager/ConsumingNestedScrollConnection.kt | 32 +++++++++++++++++++ .../web/internals/pager/RenditionPager.kt | 6 ++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ba3c3b4a8f..e4dd7ff4b9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,13 +10,13 @@ androidx-annotation = "1.9.1" androidx-appcompat = "1.7.1" androidx-browser = "1.9.0" androidx-cardview = "1.0.0" -androidx-compose-animation = "1.9.5" -androidx-compose-foundation = "1.9.5" -androidx-compose-material = "1.9.5" +androidx-compose-animation = "1.10.0" +androidx-compose-foundation = "1.10.0" +androidx-compose-material = "1.10.0" androidx-compose-material-icons = "1.7.8" androidx-compose-material3 = "1.4.0" -androidx-compose-runtime = "1.9.5" -androidx-compose-ui = "1.9.5" +androidx-compose-runtime = "1.10.0" +androidx-compose-ui = "1.10.0" androidx-constraintlayout = "2.2.1" androidx-core = "1.17.0" androidx-datastore = "1.2.0" diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt new file mode 100644 index 0000000000..57d3e092a8 --- /dev/null +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt @@ -0,0 +1,32 @@ +package org.readium.navigator.web.internals.pager + +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.input.nestedscroll.NestedScrollConnection +import androidx.compose.ui.input.nestedscroll.NestedScrollSource +import androidx.compose.ui.unit.Velocity + +internal object ConsumingNestedScrollConnection : NestedScrollConnection { + + override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset { + return available + } + + override suspend fun onPreFling(available: Velocity): Velocity { + return available + } + + override fun onPostScroll( + consumed: Offset, + available: Offset, + source: NestedScrollSource, + ): Offset { + return available + } + + override suspend fun onPostFling( + consumed: Velocity, + available: Velocity, + ): Velocity { + return available + } +} diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/RenditionPager.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/RenditionPager.kt index 38cc56090d..bada0eebe1 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/RenditionPager.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/RenditionPager.kt @@ -16,6 +16,7 @@ import androidx.compose.foundation.pager.VerticalPager import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.NestedScrollConnection +import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.unit.LayoutDirection import org.readium.navigator.web.internals.gestures.Fling2DBehavior @@ -42,6 +43,11 @@ public fun RenditionPager( reverseDirection = orientation == Orientation.Vertical || LocalLayoutDirection.current == LayoutDirection.Ltr ) + .nestedScroll( + // Consume everything passed by children into the standard nested scroll chain + // before the pager gets it in the prescroll phase because we bypass it. + connection = ConsumingNestedScrollConnection + ) // Disable built-in pager behavior as it is not suitable. val pageNestedScrollConnection = NullNestedScrollConnection From 428d3e54c2c6bc9cf923e78d993d2d21fff6482e Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 04:24:18 +0100 Subject: [PATCH 48/56] Rethrow CancellationException --- .../navigator/web/reflowable/ReflowableWebRenditionState.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 10d0112799..74003e8b66 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -398,11 +398,12 @@ internal class ReflowableNavigationDelegate( ) } } - } catch (_: Exception) { // Mainly on cancellation. + } catch (e: Exception) { // Mainly for CancellationException resourceStates.zip(destLocationByResource) .forEach { (state, location) -> state.cancelPendingLocation(location) } + throw e } } } From 5ccca9f740e4e96cb783d82f643aa5907d1b6d8c Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 04:42:35 +0100 Subject: [PATCH 49/56] Remove useless dependencies --- demos/navigator/build.gradle.kts | 1 + readium/navigators/common/build.gradle.kts | 2 -- readium/navigators/web/common/build.gradle.kts | 4 +--- readium/navigators/web/fixedlayout/build.gradle.kts | 3 --- readium/navigators/web/internals/build.gradle.kts | 5 ++--- readium/navigators/web/reflowable/build.gradle.kts | 5 ++--- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/demos/navigator/build.gradle.kts b/demos/navigator/build.gradle.kts index d76072ad17..af10f45e00 100644 --- a/demos/navigator/build.gradle.kts +++ b/demos/navigator/build.gradle.kts @@ -79,6 +79,7 @@ dependencies { implementation(libs.timber) implementation(libs.kotlinx.coroutines.android) implementation(libs.kotlinx.collections.immutable) + implementation(libs.kotlinx.serialization.json) implementation(libs.kotlin.stdlib) implementation(libs.bundles.compose) implementation(libs.google.material) diff --git a/readium/navigators/common/build.gradle.kts b/readium/navigators/common/build.gradle.kts index 624f751210..8e19c63c64 100644 --- a/readium/navigators/common/build.gradle.kts +++ b/readium/navigators/common/build.gradle.kts @@ -23,9 +23,7 @@ dependencies { api(project(":readium:readium-navigator")) api(libs.androidx.compose.foundation) - api(libs.kotlinx.coroutines.android) api(libs.kotlinx.collections.immutable) - api(libs.kotlinx.serialization.json) implementation(libs.androidx.recyclerview) implementation(libs.timber) diff --git a/readium/navigators/web/common/build.gradle.kts b/readium/navigators/web/common/build.gradle.kts index ba242ec8c0..108f09a555 100644 --- a/readium/navigators/web/common/build.gradle.kts +++ b/readium/navigators/web/common/build.gradle.kts @@ -24,8 +24,6 @@ dependencies { api(project(":readium:navigators:readium-navigator-common")) api(libs.androidx.compose.foundation) - api(libs.kotlinx.coroutines.android) - api(libs.kotlinx.collections.immutable) - api(libs.kotlinx.serialization.json) + implementation(libs.timber) } diff --git a/readium/navigators/web/fixedlayout/build.gradle.kts b/readium/navigators/web/fixedlayout/build.gradle.kts index 515258accb..93d9142de3 100644 --- a/readium/navigators/web/fixedlayout/build.gradle.kts +++ b/readium/navigators/web/fixedlayout/build.gradle.kts @@ -26,9 +26,6 @@ dependencies { implementation(project(":readium:navigators:web:readium-navigator-web-internals")) api(libs.androidx.compose.foundation) - api(libs.kotlinx.coroutines.android) - api(libs.kotlinx.collections.immutable) - api(libs.kotlinx.serialization.json) implementation(libs.timber) implementation(libs.androidx.webkit) diff --git a/readium/navigators/web/internals/build.gradle.kts b/readium/navigators/web/internals/build.gradle.kts index 9a0bbabb24..d8aa3f9d5d 100644 --- a/readium/navigators/web/internals/build.gradle.kts +++ b/readium/navigators/web/internals/build.gradle.kts @@ -25,9 +25,8 @@ dependencies { api(project(":readium:navigators:web:readium-navigator-web-common")) api(libs.androidx.compose.foundation) - api(libs.kotlinx.coroutines.android) - api(libs.kotlinx.collections.immutable) - api(libs.kotlinx.serialization.json) + + implementation(libs.kotlinx.serialization.json) implementation(libs.timber) implementation(libs.androidx.webkit) implementation(libs.jsoup) diff --git a/readium/navigators/web/reflowable/build.gradle.kts b/readium/navigators/web/reflowable/build.gradle.kts index 5ec205ae20..a0e6d61d46 100644 --- a/readium/navigators/web/reflowable/build.gradle.kts +++ b/readium/navigators/web/reflowable/build.gradle.kts @@ -23,12 +23,11 @@ dependencies { api(project(":readium:readium-navigator")) api(project(":readium:navigators:readium-navigator-common")) api(project(":readium:navigators:web:readium-navigator-web-common")) + implementation(project(":readium:navigators:web:readium-navigator-web-internals")) api(libs.androidx.compose.foundation) - api(libs.kotlinx.coroutines.android) - api(libs.kotlinx.collections.immutable) - api(libs.kotlinx.serialization.json) + implementation(libs.androidx.core) implementation(libs.timber) implementation(libs.androidx.webkit) From 573072dfa9e707b94525208bbfcd8776a4167091 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 10:01:57 +0100 Subject: [PATCH 50/56] Fix missing headers --- .../web/internals/pager/ConsumingNestedScrollConnection.kt | 6 ++++++ .../navigator/web/internals/webapi/SelectionListenerApi.kt | 6 ++++++ .../web/reflowable/resource/ReflowableWebViewport.kt | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt index 57d3e092a8..cd6dff50c7 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/pager/ConsumingNestedScrollConnection.kt @@ -1,3 +1,9 @@ +/* + * Copyright 2026 Readium Foundation. All rights reserved. + * Use of this source code is governed by the BSD-style license + * available in the top-level LICENSE file of the project. + */ + package org.readium.navigator.web.internals.pager import androidx.compose.ui.geometry.Offset diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt index 1827faf4d0..14b68138e5 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webapi/SelectionListenerApi.kt @@ -1,3 +1,9 @@ +/* + * Copyright 2025 Readium Foundation. All rights reserved. + * Use of this source code is governed by the BSD-style license + * available in the top-level LICENSE file of the project. + */ + package org.readium.navigator.web.internals.webapi import android.webkit.WebView diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt index d901d06af5..21e4edde6b 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableWebViewport.kt @@ -1,3 +1,9 @@ +/* + * Copyright 2025 Readium Foundation. All rights reserved. + * Use of this source code is governed by the BSD-style license + * available in the top-level LICENSE file of the project. + */ + package org.readium.navigator.web.reflowable.resource import org.readium.navigator.common.Position From 5c486a2db072bb609111a4b6f23bbe53a7b7ffca Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 10:56:28 +0100 Subject: [PATCH 51/56] Cosmetic changes --- .../reflowable/ReflowableWebRenditionState.kt | 86 +++++++++++-------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 74003e8b66..8678a87d55 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -80,7 +80,7 @@ import org.readium.r2.shared.util.resource.Resource * State holder for the rendition of a reflowable Web publication. * * You can interact with it mainly through its [controller] witch will be available as soon - * as the first composition has completed. + * as the first layout has completed. */ @ExperimentalReadiumApi @Stable @@ -98,18 +98,24 @@ public class ReflowableWebRenditionState internal constructor( override val controller: ReflowableWebRenditionController? by controllerState - private val initialResourceIndex = - publication.readingOrder.indexOfHref(initialLocation.href) ?: 0 + private val indexedInitialLocation: IndexedGoLocation = initialLocation + .let { location -> + publication.readingOrder.indexOfHref(location.href) + ?.let { IndexedGoLocation(it, location) } + ?: IndexedGoLocation(0, ReflowableWebGoLocation(href = publication.readingOrder[0].href)) + } internal val pagerState: PagerState = PagerState( - currentPage = initialResourceIndex, + currentPage = indexedInitialLocation.index, pageCount = { publication.readingOrder.size } ) internal val resourceStates: List = - initialLocation.toResourceLocations(initialResourceIndex, publication.readingOrder) - .zip(publication.readingOrder.items) + publication.getResourceLocations( + destinationIndex = indexedInitialLocation.index, + destinationLocation = indexedInitialLocation.location.toResourceLocation() + ).zip(publication.readingOrder.items) .mapIndexed { index, (location, item) -> ReflowableResourceState( index = index, @@ -210,29 +216,30 @@ public class ReflowableWebRenditionState internal constructor( } private fun computeViewport(): ReflowableWebViewport? { - val visibleIndexedItems = pagerState.layoutInfo.visiblePagesInfo + val indexedVisibleItems = pagerState.layoutInfo.visiblePagesInfo .map { it.index to publication.readingOrder[it.index] } - check(visibleIndexedItems.isNotEmpty()) + check(indexedVisibleItems.isNotEmpty()) - val progressions = visibleIndexedItems + val progressions = indexedVisibleItems .mapNotNull { (index, _) -> resourceStates[index].progressionRange } - if (progressions.size != visibleIndexedItems.size) { + // Have all visible items already set a progressionRange? + if (progressions.size != indexedVisibleItems.size) { return null } - val positionStart = publication - .positionForProgression(visibleIndexedItems.first().first, progressions.first().start) + val startPosition = publication + .positionForProgression(indexedVisibleItems.first().first, progressions.first().start) - val positionEnd = publication - .positionForProgression(visibleIndexedItems.last().first, progressions.last().endInclusive) + val endPosition = publication + .positionForProgression(indexedVisibleItems.last().first, progressions.last().endInclusive) return ReflowableWebViewport( - readingOrder = visibleIndexedItems.map { it.second.href }, - progressions = visibleIndexedItems.zip(progressions) + readingOrder = indexedVisibleItems.map { it.second.href }, + progressions = indexedVisibleItems.zip(progressions) .associate { (indexedItem, progression) -> indexedItem.second.href to progression }, - positions = positionStart..positionEnd + positions = startPosition..endPosition ) } @@ -376,6 +383,10 @@ internal class ReflowableNavigationDelegate( goTo(location) } + override suspend fun goTo(location: ReflowableWebLocation) { + goTo(ReflowableWebGoLocation(location.href, location.progression)) + } + override suspend fun goTo(location: ReflowableWebGoLocation) { coroutineScope { navigatorMutex.mutateWith( @@ -383,14 +394,17 @@ internal class ReflowableNavigationDelegate( priority = MutatePriority.UserInput ) { withContext(Dispatchers.Main) { - val destIndex = publication.readingOrder.indexOfHref(location.href) ?: return@withContext - val destLocationByResource = location.toResourceLocations(destIndex, publication.readingOrder) + val destIndex = publication.readingOrder.indexOfHref(location.href) + ?: return@withContext + + val destLocation = location.toResourceLocation() + val resourceLocations = publication.getResourceLocations(destIndex, destLocation) try { pagerState.scrollToPage(destIndex) suspendCoroutine { continuation -> - resourceStates.zip(destLocationByResource) + resourceStates.zip(resourceLocations) .forEach { (state, location) -> state.go( location = location, @@ -399,7 +413,7 @@ internal class ReflowableNavigationDelegate( } } } catch (e: Exception) { // Mainly for CancellationException - resourceStates.zip(destLocationByResource) + resourceStates.zip(resourceLocations) .forEach { (state, location) -> state.cancelPendingLocation(location) } @@ -410,13 +424,10 @@ internal class ReflowableNavigationDelegate( } } - override suspend fun goTo(location: ReflowableWebLocation) { - goTo(ReflowableWebGoLocation(location.href, location.progression)) - } - // This information is not available when the WebView has not yet been composed or laid out. // We assume that the best UI behavior would be to have a possible forward button disabled // and return false when we can't tell. + // FIXME: should probably be observable. override val canMoveForward: Boolean get() = pagerState.currentPage < publication.readingOrder.items.size - 1 || run { val currentResourceState = resourceStates[pagerState.currentPage] @@ -533,24 +544,29 @@ internal class ReflowableSelectionDelegate( } } -private fun ReflowableWebGoLocation.toResourceLocations( - destIndex: Int, - readingOrder: ReflowableWebPublication.ReadingOrder, -): List { - val resourceLocation = textAnchor?.let { ReflowableResourceLocation.TextAnchor(it) } +private data class IndexedGoLocation( + val index: Int, + val location: ReflowableWebGoLocation, +) + +private fun ReflowableWebGoLocation.toResourceLocation() = + textAnchor?.let { ReflowableResourceLocation.TextAnchor(it) } ?: cssSelector?.let { ReflowableResourceLocation.CssSelector(it) } ?: htmlId?.let { ReflowableResourceLocation.HtmlId(it) } ?: ReflowableResourceLocation.Progression(progression ?: Progression(0.0)!!) +private fun ReflowableWebPublication.getResourceLocations( + destinationIndex: Int, + destinationLocation: ReflowableResourceLocation, +): List { return readingOrder.items.mapIndexed { index, _ -> when { - index < destIndex -> + index < destinationIndex -> ReflowableResourceLocation.Progression(Progression(1.0)!!) - - index > destIndex -> + index > destinationIndex -> ReflowableResourceLocation.Progression(Progression(0.0)!!) - - else -> resourceLocation + else -> + destinationLocation } } } From e98a9392d415ca456d4d7de05ebb0b4b3882ca9a Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 11:08:12 +0100 Subject: [PATCH 52/56] Add safeguards inspired by fixed layout misfortune on reflowable --- .../web/reflowable/ReflowableWebRendition.kt | 30 ++++++++++++------- .../reflowable/ReflowableWebRenditionState.kt | 6 ++-- .../ReflowableWebPreferencesEditor.kt | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index cf79ef9824..ffa271b7e0 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -77,8 +77,17 @@ public fun ReflowableWebRendition( decorationListener: DecorationListener = defaultDecorationListener(state.controller), textSelectionActionModeCallback: ActionMode.Callback? = null, ) { + val overflowNow = state.layoutDelegate.overflow.value + val layoutDirection = - state.layoutDelegate.overflow.value.readingProgression.toLayoutDirection() + overflowNow.readingProgression.toLayoutDirection() + + val layoutOrientation = + overflowNow.orientation + + val settingsNow = state.layoutDelegate.settings + + val injectorNow = state.layoutDelegate.readiumCssInjector CompositionLocalProvider(LocalLayoutDirection provides layoutDirection) { BoxWithConstraints( @@ -95,7 +104,7 @@ public fun ReflowableWebRendition( val coroutineScope = rememberCoroutineScope() - val resourcePadding = when (state.layoutDelegate.overflow.value.scroll) { + val resourcePadding = when (overflowNow.scroll) { true -> AbsolutePaddingValues() false -> { @@ -111,7 +120,7 @@ public fun ReflowableWebRendition( } } - val flingBehavior = if (state.layoutDelegate.overflow.value.scroll) { + val flingBehavior = if (overflowNow.scroll) { ScrollableDefaults.flingBehavior() } else { pagingFlingBehavior( @@ -122,9 +131,9 @@ public fun ReflowableWebRendition( direction = layoutDirection ) ) - }.toFling2DBehavior(state.layoutDelegate.orientation) + }.toFling2DBehavior(layoutOrientation) - val backgroundColor = Color(state.layoutDelegate.settings.backgroundColor.int) + val backgroundColor = Color(settingsNow.backgroundColor.int) val currentPageState = state.pagerState.currentPage @@ -138,13 +147,12 @@ public fun ReflowableWebRendition( RenditionPager( modifier = Modifier - // Apply background on padding - .background(backgroundColor), + .background(backgroundColor), // Apply background on padding state = state.pagerState, scrollState = state.scrollState, flingBehavior = flingBehavior, beyondViewportPageCount = 3, - orientation = state.layoutDelegate.orientation, + orientation = layoutOrientation, ) { index -> val href = state.publication.readingOrder.items[index].href @@ -159,9 +167,9 @@ public fun ReflowableWebRendition( backgroundColor = backgroundColor, padding = resourcePadding, layoutDirection = layoutDirection, - scroll = state.layoutDelegate.settings.scroll, - orientation = state.layoutDelegate.orientation, - readiumCssInjector = state.layoutDelegate.readiumCssInjector, + scroll = overflowNow.scroll, + orientation = layoutOrientation, + readiumCssInjector = injectorNow, decorationTemplates = state.decorationDelegate.decorationTemplates, decorations = decorations, actionModeCallback = textSelectionActionModeCallback, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 8678a87d55..515845801c 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -340,11 +340,11 @@ internal class ReflowableLayoutDelegate( } } } - - internal val orientation: Orientation get() = - overflow.value.axis.toOrientation() } +internal val Overflow.orientation: Orientation get() = + axis.toOrientation() + @OptIn(ExperimentalReadiumApi::class, InternalReadiumApi::class) internal class ReflowableNavigationDelegate( private val publication: ReflowableWebPublication, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/preferences/ReflowableWebPreferencesEditor.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/preferences/ReflowableWebPreferencesEditor.kt index e66b0b4d20..90082e1ec4 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/preferences/ReflowableWebPreferencesEditor.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/preferences/ReflowableWebPreferencesEditor.kt @@ -466,7 +466,7 @@ public class ReflowableWebPreferencesEditor internal constructor( private fun ReflowableWebPreferences.toState(): State { val settings = settingsResolver.settings(this) - val readiumCssLayout = ReadiumCssLayout.Companion.from(settings) + val readiumCssLayout = ReadiumCssLayout.from(settings) return State( preferences = this, From d9ea5f912b3ab8df60c85d47636f88679b1be86a Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 11:17:01 +0100 Subject: [PATCH 53/56] Small fixes --- .../navigator/web/reflowable/ReflowableWebRendition.kt | 9 ++------- .../web/reflowable/resource/ReflowableResource.kt | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt index ffa271b7e0..05cc956d78 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRendition.kt @@ -11,7 +11,6 @@ package org.readium.navigator.web.reflowable import android.annotation.SuppressLint import android.content.res.Configuration import android.view.ActionMode -import androidx.compose.foundation.background import androidx.compose.foundation.gestures.ScrollableDefaults import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.WindowInsets @@ -135,19 +134,15 @@ public fun ReflowableWebRendition( val backgroundColor = Color(settingsNow.backgroundColor.int) - val currentPageState = state.pagerState.currentPage - - LaunchedEffect(currentPageState) { + LaunchedEffect(state.pagerState) { snapshotFlow { - currentPageState + state.pagerState.currentPage }.onEach { state.updateLocation() }.launchIn(this) } RenditionPager( - modifier = Modifier - .background(backgroundColor), // Apply background on padding state = state.pagerState, scrollState = state.scrollState, flingBehavior = flingBehavior, diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt index b7b9eb8258..4189b5b3a8 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/resource/ReflowableResource.kt @@ -416,6 +416,7 @@ internal fun ReflowableResource( WebView( modifier = Modifier .fillMaxSize() + .background(backgroundColor) .absolutePadding(padding), state = webViewState, factory = { RelaxedWebView(it) }, From 8282dd259f9f01cb3d6c6b4c11334e56d00c3015 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Fri, 6 Feb 2026 12:01:45 +0100 Subject: [PATCH 54/56] Remove log --- readium/navigator/src/main/assets/_scripts/src/gestures.js | 2 -- .../navigator/src/main/assets/readium/scripts/readium-fixed.js | 2 +- .../src/main/assets/readium/scripts/readium-reflowable.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/readium/navigator/src/main/assets/_scripts/src/gestures.js b/readium/navigator/src/main/assets/_scripts/src/gestures.js index 21dcb3b9ce..9bee231b02 100644 --- a/readium/navigator/src/main/assets/_scripts/src/gestures.js +++ b/readium/navigator/src/main/assets/_scripts/src/gestures.js @@ -18,8 +18,6 @@ function onClick(event) { return; } - console.log("Reporting tap"); - var pixelRatio = window.devicePixelRatio; let clickEvent = { defaultPrevented: event.defaultPrevented, diff --git a/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js b/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js index bc2b8d87ff..924d40b71d 100644 --- a/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js +++ b/readium/navigator/src/main/assets/readium/scripts/readium-fixed.js @@ -1,2 +1,2 @@ -!function(){var u={1844:function(u,t){"use strict";function e(u){return u.split("").reverse().join("")}function r(u){return(u|-u)>>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\u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EFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\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F91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA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uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC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A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0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uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA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uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA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uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD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5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uA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DCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-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46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0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-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|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uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\u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B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e>31&1}function n(u,t,e,n){var o=u.P[e],D=u.M[e],i=n>>>31,a=t[e]|i,c=a|D,F=(a&o)+o^o|a,l=D|~(F|o),f=o&F,s=r(l&u.lastRowMask[e])-r(f&u.lastRowMask[e]);return l<<=1,f<<=1,o=(f|=i)|~(c|(l|=r(n)-i)),D=l&c,u.P[e]=o,u.M[e]=D,s}function o(u,t,e){if(0===t.length)return[];e=Math.min(e,t.length);var r=[],o=32,D=Math.ceil(t.length/o)-1,i={P:new Uint32Array(D+1),M:new Uint32Array(D+1),lastRowMask:new Uint32Array(D+1)};i.lastRowMask.fill(1<<31),i.lastRowMask[D]=1<<(t.length-1)%o;for(var a=new Uint32Array(D+1),c=new Map,F=[],l=0;l<256;l++)F.push(a);for(var f=0;f=t.length||t.charCodeAt(C)===s&&(p[A]|=1<0&&d[y]>=e+o;)y-=1;y===D&&d[y]<=e&&(d[y]-1?n(e):e}},2755:function(u,t,e){"use strict";var r=e(3569),n=e(2870),o=n("%Function.prototype.apply%"),D=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||r.call(D,o),a=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),F=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch(u){c=null}u.exports=function(u){var t=i(r,D,arguments);return a&&c&&a(t,"length").configurable&&c(t,"length",{value:1+F(0,u.length-(arguments.length-1))}),t};var l=function(){return i(r,o,arguments)};c?c(u.exports,"apply",{value:l}):u.exports.apply=l},6663:function(u,t,e){"use strict";var r=e(229)(),n=e(2870),o=r&&n("%Object.defineProperty%",!0),D=n("%SyntaxError%"),i=n("%TypeError%"),a=e(658);u.exports=function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,F=arguments.length>6&&arguments[6],l=!!a&&a(u,t);if(o)o(u,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===r&&l?l.enumerable:!r,value:e,writable:null===n&&l?l.writable:!n});else{if(!F&&(r||n||c))throw new D("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");u[t]=e}}},9722:function(u,t,e){"use strict";var r=e(2051),n="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,D=Array.prototype.concat,i=e(6663),a=e(229)(),c=function(u,t,e,r){if(t in u)if(!0===r){if(u[t]===e)return}else if("function"!=typeof(n=r)||"[object Function]"!==o.call(n)||!r())return;var n;a?i(u,t,e,!0):i(u,t,e)},F=function(u,t){var e=arguments.length>2?arguments[2]:{},o=r(t);n&&(o=D.call(o,Object.getOwnPropertySymbols(t)));for(var i=0;i2&&arguments[2]&&arguments[2].force;!D||!e&&o(u,D)||(r?r(u,D,{configurable:!0,enumerable:!1,value:t,writable:!1}):u[D]=t)}},7358:function(u,t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,n=e(7959),o=e(3655),D=e(455),i=e(8760);u.exports=function(u){if(n(u))return u;var t,e="default";if(arguments.length>1&&(arguments[1]===String?e="string":arguments[1]===Number&&(e="number")),r&&(Symbol.toPrimitive?t=function(u,t){var e=u[t];if(null!=e){if(!o(e))throw new TypeError(e+" returned for property "+t+" of object "+u+" is not a function");return e}}(u,Symbol.toPrimitive):i(u)&&(t=Symbol.prototype.valueOf)),void 0!==t){var a=t.call(u,e);if(n(a))return a;throw new TypeError("unable to convert exotic object to primitive")}return"default"===e&&(D(u)||i(u))&&(e="string"),function(u,t){if(null==u)throw new TypeError("Cannot call method on "+u);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var e,r,D,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(D=0;D1&&"boolean"!=typeof t)throw new D('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,u))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var e=function(u){var t=v(u,0,1),e=v(u,-1);if("%"===t&&"%"!==e)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===e&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var r=[];return b(u,x,(function(u,t,e,n){r[r.length]=e?b(n,S,"$1"):t||u})),r}(u),r=e.length>0?e[0]:"",o=O("%"+r+"%",t),i=o.name,c=o.value,F=!1,l=o.alias;l&&(r=l[0],m(e,g([0,1],l)));for(var f=1,s=!0;f=e.length){var y=a(c,p);c=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else s=B(c,p),c=c[p];s&&!F&&(E[i]=c)}}return c}},658:function(u,t,e){"use strict";var r=e(2870)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(u){r=null}u.exports=r},229:function(u,t,e){"use strict";var r=e(2870)("%Object.defineProperty%",!0),n=function(){if(r)try{return r({},"a",{value:1}),!0}catch(u){return!1}return!1};n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return 1!==r([],"length",{value:1}).length}catch(u){return!0}},u.exports=n},3413:function(u){"use strict";var t={foo:{}},e=Object;u.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof e)}},1143:function(u,t,e){"use strict";var r="undefined"!=typeof Symbol&&Symbol,n=e(9985);u.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}},9985:function(u){"use strict";u.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},t=Symbol("test"),e=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;for(t in u[t]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var r=Object.getOwnPropertySymbols(u);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(u,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(u,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},3060:function(u,t,e){"use strict";var r=e(9985);u.exports=function(){return r()&&!!Symbol.toStringTag}},9545:function(u){"use strict";var t={}.hasOwnProperty,e=Function.prototype.call;u.exports=e.bind?e.bind(t):function(u,r){return e.call(t,u,r)}},7284:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=e(5714)(),D=r("%TypeError%"),i={assert:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");if(o.assert(u),!i.has(u,t))throw new D("`"+t+"` is not present on `O`")},get:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return e&&e["$"+t]},has:function(u,t){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var e=o.get(u);return!!e&&n(e,"$"+t)},set:function(u,t,e){if(!u||"object"!=typeof u&&"function"!=typeof u)throw new D("`O` is not an object");if("string"!=typeof t)throw new D("`slot` must be a string");var r=o.get(u);r||(r={},o.set(u,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(i),u.exports=i},3655:function(u){"use strict";var t,e,r=Function.prototype.toString,n="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof n&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw e}}),e={},n((function(){throw 42}),null,t)}catch(u){u!==e&&(n=null)}else n=null;var o=/^\s*class\b/,D=function(u){try{var t=r.call(u);return o.test(t)}catch(u){return!1}},i=function(u){try{return!D(u)&&(r.call(u),!0)}catch(u){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,F=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;a.call(f)===a.call(document.all)&&(l=function(u){if((F||!u)&&(void 0===u||"object"==typeof u))try{var t=a.call(u);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==u("")}catch(u){}return!1})}u.exports=n?function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;try{n(u,null,t)}catch(u){if(u!==e)return!1}return!D(u)&&i(u)}:function(u){if(l(u))return!0;if(!u)return!1;if("function"!=typeof u&&"object"!=typeof u)return!1;if(c)return i(u);if(D(u))return!1;var t=a.call(u);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&i(u)}},455:function(u,t,e){"use strict";var r=Date.prototype.getDay,n=Object.prototype.toString,o=e(3060)();u.exports=function(u){return"object"==typeof u&&null!==u&&(o?function(u){try{return r.call(u),!0}catch(u){return!1}}(u):"[object Date]"===n.call(u))}},5494:function(u,t,e){"use strict";var r,n,o,D,i=e(3099),a=e(3060)();if(a){r=i("Object.prototype.hasOwnProperty"),n=i("RegExp.prototype.exec"),o={};var c=function(){throw o};D={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(D[Symbol.toPrimitive]=c)}var F=i("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;u.exports=a?function(u){if(!u||"object"!=typeof u)return!1;var t=l(u,"lastIndex");if(!t||!r(t,"value"))return!1;try{n(u,D)}catch(u){return u===o}}:function(u){return!(!u||"object"!=typeof u&&"function"!=typeof u)&&"[object RegExp]"===F(u)}},8760:function(u,t,e){"use strict";var r=Object.prototype.toString;if(e(1143)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;u.exports=function(u){if("symbol"==typeof u)return!0;if("[object Symbol]"!==r.call(u))return!1;try{return function(u){return"symbol"==typeof u.valueOf()&&o.test(n.call(u))}(u)}catch(u){return!1}}}else u.exports=function(u){return!1}},4538:function(u,t,e){var r="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&"function"==typeof n.get?n.get:null,D=r&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=i&&a&&"function"==typeof a.get?a.get:null,F=i&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,A=Object.prototype.toString,E=Function.prototype.toString,C=String.prototype.match,y=String.prototype.slice,d=String.prototype.replace,h=String.prototype.toUpperCase,B=String.prototype.toLowerCase,g=RegExp.prototype.test,m=Array.prototype.concat,b=Array.prototype.join,v=Array.prototype.slice,w=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(u){return u.__proto__}:null);function R(u,t){if(u===1/0||u===-1/0||u!=u||u&&u>-1e3&&u<1e3||g.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof u){var r=u<0?-w(-u):w(u);if(r!==u){var n=String(r),o=y.call(t,n.length+1);return d.call(n,e,"$&_")+"."+d.call(d.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(t,e,"$&_")}var N=e(7002),M=N.custom,k=W(M)?M:null;function L(u,t,e){var r="double"===(e.quoteStyle||t)?'"':"'";return r+u+r}function $(u){return d.call(String(u),/"/g,""")}function _(u){return!("[object Array]"!==H(u)||P&&"object"==typeof u&&P in u)}function U(u){return!("[object RegExp]"!==H(u)||P&&"object"==typeof u&&P in u)}function W(u){if(j)return u&&"object"==typeof u&&u instanceof Symbol;if("symbol"==typeof u)return!0;if(!u||"object"!=typeof u||!O)return!1;try{return O.call(u),!0}catch(u){}return!1}u.exports=function u(t,e,r,n){var i=e||{};if(V(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!V(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var h=String(t);return A?R(t,h):h}if("bigint"==typeof t){var g=String(t)+"n";return A?R(t,g):g}var w=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=w&&w>0&&"object"==typeof t)return _(t)?"[Array]":"[Object]";var S,M=function(u,t){var e;if("\t"===u.indent)e="\t";else{if(!("number"==typeof u.indent&&u.indent>0))return null;e=b.call(Array(u.indent+1)," ")}return{base:e,prev:b.call(Array(t+1),e)}}(i,r);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,e,o){if(e&&(n=v.call(n)).push(e),o){var D={depth:i.depth};return V(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),u(t,D,r+1,n)}return u(t,i,r+1,n)}if("function"==typeof t&&!U(t)){var Y=function(u){if(u.name)return u.name;var t=C.call(E.call(u),/^function\s*([\w$]+)/);return t?t[1]:null}(t),uu=Q(t,G);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(uu.length>0?" { "+b.call(uu,", ")+" }":"")}if(W(t)){var tu=j?d.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||j?tu:z(tu)}if((S=t)&&"object"==typeof S&&("undefined"!=typeof HTMLElement&&S instanceof HTMLElement||"string"==typeof S.nodeName&&"function"==typeof S.getAttribute)){for(var eu="<"+B.call(String(t.nodeName)),ru=t.attributes||[],nu=0;nu"}if(_(t)){if(0===t.length)return"[]";var ou=Q(t,G);return M&&!function(u){for(var t=0;t=0)return!1;return!0}(ou)?"["+Z(ou,M)+"]":"[ "+b.call(ou,", ")+" ]"}if(function(u){return!("[object Error]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)){var Du=Q(t,G);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===Du.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(Du,", ")+" }":"{ ["+String(t)+"] "+b.call(m.call("[cause]: "+G(t.cause),Du),", ")+" }"}if("object"==typeof t&&a){if(k&&"function"==typeof t[k]&&N)return N(t,{depth:w-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(u){if(!o||!u||"object"!=typeof u)return!1;try{o.call(u);try{c.call(u)}catch(u){return!0}return u instanceof Map}catch(u){}return!1}(t)){var iu=[];return D&&D.call(t,(function(u,e){iu.push(G(e,t,!0)+" => "+G(u,t))})),K("Map",o.call(t),iu,M)}if(function(u){if(!c||!u||"object"!=typeof u)return!1;try{c.call(u);try{o.call(u)}catch(u){return!0}return u instanceof Set}catch(u){}return!1}(t)){var au=[];return F&&F.call(t,(function(u){au.push(G(u,t))})),K("Set",c.call(t),au,M)}if(function(u){if(!l||!u||"object"!=typeof u)return!1;try{l.call(u,l);try{f.call(u,f)}catch(u){return!0}return u instanceof WeakMap}catch(u){}return!1}(t))return J("WeakMap");if(function(u){if(!f||!u||"object"!=typeof u)return!1;try{f.call(u,f);try{l.call(u,l)}catch(u){return!0}return u instanceof WeakSet}catch(u){}return!1}(t))return J("WeakSet");if(function(u){if(!s||!u||"object"!=typeof u)return!1;try{return s.call(u),!0}catch(u){}return!1}(t))return J("WeakRef");if(function(u){return!("[object Number]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(Number(t)));if(function(u){if(!u||"object"!=typeof u||!x)return!1;try{return x.call(u),!0}catch(u){}return!1}(t))return z(G(x.call(t)));if(function(u){return!("[object Boolean]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(p.call(t));if(function(u){return!("[object String]"!==H(u)||P&&"object"==typeof u&&P in u)}(t))return z(G(String(t)));if(!function(u){return!("[object Date]"!==H(u)||P&&"object"==typeof u&&P in u)}(t)&&!U(t)){var cu=Q(t,G),Fu=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,lu=t instanceof Object?"":"null prototype",fu=!Fu&&P&&Object(t)===t&&P in t?y.call(H(t),8,-1):lu?"Object":"",su=(Fu||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fu||lu?"["+b.call(m.call([],fu||[],lu||[]),": ")+"] ":"");return 0===cu.length?su+"{}":M?su+"{"+Z(cu,M)+"}":su+"{ "+b.call(cu,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(u){return u in this};function V(u,t){return G.call(u,t)}function H(u){return A.call(u)}function q(u,t){if(u.indexOf)return u.indexOf(t);for(var e=0,r=u.length;et.maxStringLength){var e=u.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return X(y.call(u,0,t.maxStringLength),t)+r}return L(d.call(d.call(u,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(u){var t=u.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+h.call(t.toString(16))}function z(u){return"Object("+u+")"}function J(u){return u+" { ? }"}function K(u,t,e,r){return u+" ("+t+") {"+(r?Z(e,r):b.call(e,", "))+"}"}function Z(u,t){if(0===u.length)return"";var e="\n"+t.prev+t.base;return e+b.call(u,","+e)+"\n"+t.prev}function Q(u,t){var e=_(u),r=[];if(e){r.length=u.length;for(var n=0;n0&&!n.call(u,0))for(var A=0;A0)for(var E=0;E=0&&"[object Function]"===t.call(u.callee)),r}},9766:function(u,t,e){"use strict";var r=e(8921),n=Object,o=TypeError;u.exports=r((function(){if(null!=this&&this!==n(this))throw new o("RegExp.prototype.flags getter called on non-object");var u="";return this.hasIndices&&(u+="d"),this.global&&(u+="g"),this.ignoreCase&&(u+="i"),this.multiline&&(u+="m"),this.dotAll&&(u+="s"),this.unicode&&(u+="u"),this.unicodeSets&&(u+="v"),this.sticky&&(u+="y"),u}),"get flags",!0)},483:function(u,t,e){"use strict";var r=e(9722),n=e(2755),o=e(9766),D=e(5113),i=e(7299),a=n(D());r(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},5113:function(u,t,e){"use strict";var r=e(9766),n=e(9722).supportsDescriptors,o=Object.getOwnPropertyDescriptor;u.exports=function(){if(n&&"gim"===/a/gim.flags){var u=o(RegExp.prototype,"flags");if(u&&"function"==typeof u.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",e={};if(Object.defineProperty(e,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(e,"sticky",{get:function(){t+="y"}}),"dy"===t)return u.get}}return r}},7299:function(u,t,e){"use strict";var r=e(9722).supportsDescriptors,n=e(5113),o=Object.getOwnPropertyDescriptor,D=Object.defineProperty,i=TypeError,a=Object.getPrototypeOf,c=/a/;u.exports=function(){if(!r||!a)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=n(),t=a(c),e=o(t,"flags");return e&&e.get===u||D(t,"flags",{configurable:!0,enumerable:!1,get:u}),u}},7582:function(u,t,e){"use strict";var r=e(3099),n=e(2870),o=e(5494),D=r("RegExp.prototype.exec"),i=n("%TypeError%");u.exports=function(u){if(!o(u))throw new i("`regex` must be a RegExp");return function(t){return null!==D(u,t)}}},8921:function(u,t,e){"use strict";var r=e(6663),n=e(229)(),o=e(5610).functionsHaveConfigurableNames(),D=TypeError;u.exports=function(u,t){if("function"!=typeof u)throw new D("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!o||(n?r(u,"name",t,!0,!0):r(u,"name",t)),u}},5714:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=e(4538),D=r("%TypeError%"),i=r("%WeakMap%",!0),a=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),F=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),p=n("Map.prototype.has",!0),A=function(u,t){for(var e,r=u;null!==(e=r.next);r=e)if(e.key===t)return r.next=e.next,e.next=u.next,u.next=e,e};u.exports=function(){var u,t,e,r={assert:function(u){if(!r.has(u))throw new D("Side channel does not contain "+o(u))},get:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return c(u,r)}else if(a){if(t)return f(t,r)}else if(e)return function(u,t){var e=A(u,t);return e&&e.value}(e,r)},has:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(u)return l(u,r)}else if(a){if(t)return p(t,r)}else if(e)return function(u,t){return!!A(u,t)}(e,r);return!1},set:function(r,n){i&&r&&("object"==typeof r||"function"==typeof r)?(u||(u=new i),F(u,r,n)):a?(t||(t=new a),s(t,r,n)):(e||(e={key:{},next:null}),function(u,t,e){var r=A(u,t);r?r.value=e:u.next={key:t,next:u.next,value:e}}(e,r,n))}};return r}},3073:function(u,t,e){"use strict";var r=e(7113),n=e(151),o=e(1959),D=e(9497),i=e(5128),a=e(6751),c=e(3099),F=e(1143)(),l=e(483),f=c("String.prototype.indexOf"),s=e(2009),p=function(u){var t=s();if(F&&"symbol"==typeof Symbol.matchAll){var e=o(u,Symbol.matchAll);return e===RegExp.prototype[Symbol.matchAll]&&e!==t?t:e}if(D(u))return t};u.exports=function(u){var t=a(this);if(null!=u){if(D(u)){var e="flags"in u?n(u,"flags"):l(u);if(a(e),f(i(e),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(u);if(void 0!==o)return r(o,u,[t])}var c=i(t),F=new RegExp(u,"g");return r(p(F),F,[c])}},5155:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(3073),D=e(1794),i=e(3911),a=r(o);n(a,{getPolyfill:D,implementation:o,shim:i}),u.exports=a},2009:function(u,t,e){"use strict";var r=e(1143)(),n=e(8012);u.exports=function(){return r&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:n}},1794:function(u,t,e){"use strict";var r=e(3073);u.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(u){return String.prototype.matchAll}return r}},8012:function(u,t,e){"use strict";var r=e(1398),n=e(151),o=e(8322),D=e(2449),i=e(3995),a=e(5128),c=e(1874),F=e(483),l=e(8921),f=e(3099)("String.prototype.indexOf"),s=RegExp,p="flags"in RegExp.prototype,A=l((function(u){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var e=a(u),l=function(u,t){var e="flags"in t?n(t,"flags"):a(F(t));return{flags:e,matcher:new u(p&&"string"==typeof e?t:u===s?t.source:t,e)}}(D(t,s),t),A=l.flags,E=l.matcher,C=i(n(t,"lastIndex"));o(E,"lastIndex",C,!0);var y=f(A,"g")>-1,d=f(A,"u")>-1;return r(E,e,y,d)}),"[Symbol.matchAll]",!0);u.exports=A},3911:function(u,t,e){"use strict";var r=e(9722),n=e(1143)(),o=e(1794),D=e(2009),i=Object.defineProperty,a=Object.getOwnPropertyDescriptor;u.exports=function(){var u=o();if(r(String.prototype,{matchAll:u},{matchAll:function(){return String.prototype.matchAll!==u}}),n){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(r(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),i&&a){var e=a(Symbol,t);e&&!e.configurable||i(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=D(),F={};F[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},r(RegExp.prototype,F,l)}return u}},8125:function(u,t,e){"use strict";var r=e(6751),n=e(5128),o=e(3099)("String.prototype.replace"),D=/^\s$/.test("᠎"),i=D?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=D?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;u.exports=function(){var u=n(r(this));return o(o(u,i,""),a,"")}},9434:function(u,t,e){"use strict";var r=e(2755),n=e(9722),o=e(6751),D=e(8125),i=e(3228),a=e(818),c=r(i()),F=function(u){return o(u),c(u)};n(F,{getPolyfill:i,implementation:D,shim:a}),u.exports=F},3228:function(u,t,e){"use strict";var r=e(8125);u.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},818:function(u,t,e){"use strict";var r=e(9722),n=e(3228);u.exports=function(){var u=n();return r(String.prototype,{trim:u},{trim:function(){return String.prototype.trim!==u}}),u}},7002:function(){},1510:function(u,t,e){"use strict";var r=e(2870),n=e(6318),o=e(1874),D=e(2990),i=e(5674),a=r("%TypeError%");u.exports=function(u,t,e){if("String"!==o(u))throw new a("Assertion failed: `S` must be a String");if(!D(t)||t<0||t>i)throw new a("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==o(e))throw new a("Assertion failed: `unicode` must be a Boolean");return e?t+1>=u.length?t+1:t+n(u,t)["[[CodeUnitCount]]"]:t+1}},7113:function(u,t,e){"use strict";var r=e(2870),n=e(3099),o=r("%TypeError%"),D=e(6287),i=r("%Reflect.apply%",!0)||n("Function.prototype.apply");u.exports=function(u,t){var e=arguments.length>2?arguments[2]:[];if(!D(e))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(u,t,e)}},6318:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099),o=e(5541),D=e(959),i=e(1874),a=e(1751),c=n("String.prototype.charAt"),F=n("String.prototype.charCodeAt");u.exports=function(u,t){if("String"!==i(u))throw new r("Assertion failed: `string` must be a String");var e=u.length;if(t<0||t>=e)throw new r("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=F(u,t),l=c(u,t),f=o(n),s=D(n);if(!f&&!s)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(s||t+1===e)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=F(u,t+1);return D(p)?{"[[CodePoint]]":a(n,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(1874);u.exports=function(u,t){if("Boolean"!==n(t))throw new r("Assertion failed: Type(done) is not Boolean");return{value:u,done:t}}},6782:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(2860),o=e(8357),D=e(3301),i=e(6284),a=e(8277),c=e(1874);u.exports=function(u,t,e){if("Object"!==c(u))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");return n(D,a,o,u,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":e,"[[Writable]]":!0})}},1398:function(u,t,e){"use strict";var r=e(2870),n=e(1143)(),o=r("%TypeError%"),D=r("%IteratorPrototype%",!0),i=e(1510),a=e(5702),c=e(6782),F=e(151),l=e(5716),f=e(3500),s=e(8322),p=e(3995),A=e(5128),E=e(1874),C=e(7284),y=e(2263),d=function(u,t,e,r){if("String"!==E(t))throw new o("`S` must be a string");if("Boolean"!==E(e))throw new o("`global` must be a boolean");if("Boolean"!==E(r))throw new o("`fullUnicode` must be a boolean");C.set(this,"[[IteratingRegExp]]",u),C.set(this,"[[IteratedString]]",t),C.set(this,"[[Global]]",e),C.set(this,"[[Unicode]]",r),C.set(this,"[[Done]]",!1)};D&&(d.prototype=l(D)),c(d.prototype,"next",(function(){var u=this;if("Object"!==E(u))throw new o("receiver must be an object");if(!(u instanceof d&&C.has(u,"[[IteratingRegExp]]")&&C.has(u,"[[IteratedString]]")&&C.has(u,"[[Global]]")&&C.has(u,"[[Unicode]]")&&C.has(u,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(C.get(u,"[[Done]]"))return a(void 0,!0);var t=C.get(u,"[[IteratingRegExp]]"),e=C.get(u,"[[IteratedString]]"),r=C.get(u,"[[Global]]"),n=C.get(u,"[[Unicode]]"),D=f(t,e);if(null===D)return C.set(u,"[[Done]]",!0),a(void 0,!0);if(r){if(""===A(F(D,"0"))){var c=p(F(t,"lastIndex")),l=i(e,c,n);s(t,"lastIndex",l,!0)}return a(D,!1)}return C.set(u,"[[Done]]",!0),a(D,!1)})),n&&(y(d.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof d.prototype[Symbol.iterator])&&c(d.prototype,Symbol.iterator,(function(){return this})),u.exports=function(u,t,e,r){return new d(u,t,e,r)}},3645:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(7999),o=e(2860),D=e(8357),i=e(8355),a=e(3301),c=e(6284),F=e(8277),l=e(7628),f=e(1874);u.exports=function(u,t,e){if("Object"!==f(u))throw new r("Assertion failed: Type(O) is not Object");if(!c(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},e)?e:l(e);if(!n({Type:f,IsDataDescriptor:a,IsAccessorDescriptor:i},s))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return o(a,F,D,u,t,s)}},8357:function(u,t,e){"use strict";var r=e(1489),n=e(1598),o=e(1874);u.exports=function(u){return void 0!==u&&r(o,"Property Descriptor","Desc",u),n(u)}},151:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284),D=e(1874);u.exports=function(u,t){if("Object"!==D(u))throw new r("Assertion failed: Type(O) is not Object");if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},1959:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(9374),o=e(7304),D=e(6284),i=e(4538);u.exports=function(u,t){if(!D(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var e=n(u,t);if(null!=e){if(!o(e))throw new r(i(t)+" is not a function: "+i(e));return e}}},9374:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(4538),o=e(6284);u.exports=function(u,t){if(!o(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+n(t));return u[t]}},8355:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Get]]")&&!r(u,"[[Set]]")))}},6287:function(u,t,e){"use strict";u.exports=e(2403)},7304:function(u,t,e){"use strict";u.exports=e(3655)},4791:function(u,t,e){"use strict";var r=e(6740)("%Reflect.construct%",!0),n=e(3645);try{n({},"",{"[[Get]]":function(){}})}catch(u){n=null}if(n&&r){var o={},D={};n(D,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),u.exports=function(u){try{r(u,D)}catch(u){return u===o}}}else u.exports=function(u){return"function"==typeof u&&!!u.prototype}},3301:function(u,t,e){"use strict";var r=e(9545),n=e(1874),o=e(1489);u.exports=function(u){return void 0!==u&&(o(n,"Property Descriptor","Desc",u),!(!r(u,"[[Value]]")&&!r(u,"[[Writable]]")))}},6284:function(u){"use strict";u.exports=function(u){return"string"==typeof u||"symbol"==typeof u}},9497:function(u,t,e){"use strict";var r=e(2870)("%Symbol.match%",!0),n=e(5494),o=e(5695);u.exports=function(u){if(!u||"object"!=typeof u)return!1;if(r){var t=u[r];if(void 0!==t)return o(t)}return n(u)}},5716:function(u,t,e){"use strict";var r=e(2870),n=r("%Object.create%",!0),o=r("%TypeError%"),D=r("%SyntaxError%"),i=e(6287),a=e(1874),c=e(7735),F=e(7284),l=e(3413)();u.exports=function(u){if(null!==u&&"Object"!==a(u))throw new o("Assertion failed: `proto` must be null or an object");var t,e=arguments.length<2?[]:arguments[1];if(!i(e))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(n)t=n(u);else if(l)t={__proto__:u};else{if(null===u)throw new D("native Object.create support is required to create null objects");var r=function(){};r.prototype=u,t=new r}return e.length>0&&c(e,(function(u){F.set(t,u,void 0)})),t}},3500:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(3099)("RegExp.prototype.exec"),o=e(7113),D=e(151),i=e(7304),a=e(1874);u.exports=function(u,t){if("Object"!==a(u))throw new r("Assertion failed: `R` must be an Object");if("String"!==a(t))throw new r("Assertion failed: `S` must be a String");var e=D(u,"exec");if(i(e)){var c=o(e,u,[t]);if(null===c||"Object"===a(c))return c;throw new r('"exec" method must return `null` or an Object')}return n(u,t)}},6751:function(u,t,e){"use strict";u.exports=e(9572)},8277:function(u,t,e){"use strict";var r=e(159);u.exports=function(u,t){return u===t?0!==u||1/u==1/t:r(u)&&r(t)}},8322:function(u,t,e){"use strict";var r=e(2870)("%TypeError%"),n=e(6284),o=e(8277),D=e(1874),i=function(){try{return delete[].length,!0}catch(u){return!1}}();u.exports=function(u,t,e,a){if("Object"!==D(u))throw new r("Assertion failed: `O` must be an Object");if(!n(t))throw new r("Assertion failed: `P` must be a Property Key");if("Boolean"!==D(a))throw new r("Assertion failed: `Throw` must be a Boolean");if(a){if(u[t]=e,i&&!o(u[t],e))throw new r("Attempted to assign to readonly property.");return!0}try{return u[t]=e,!i||o(u[t],e)}catch(u){return!1}}},2449:function(u,t,e){"use strict";var r=e(2870),n=r("%Symbol.species%",!0),o=r("%TypeError%"),D=e(4791),i=e(1874);u.exports=function(u,t){if("Object"!==i(u))throw new o("Assertion failed: Type(O) is not Object");var e=u.constructor;if(void 0===e)return t;if("Object"!==i(e))throw new o("O.constructor is not an Object");var r=n?e[n]:void 0;if(null==r)return t;if(D(r))return r;throw new o("no constructor found")}},6207:function(u,t,e){"use strict";var r=e(2870),n=r("%Number%"),o=r("%RegExp%"),D=r("%TypeError%"),i=r("%parseInt%"),a=e(3099),c=e(7582),F=a("String.prototype.slice"),l=c(/^0b[01]+$/i),f=c(/^0o[0-7]+$/i),s=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),A=e(9434),E=e(1874);u.exports=function u(t){if("String"!==E(t))throw new D("Assertion failed: `argument` is not a String");if(l(t))return n(i(F(t,2),2));if(f(t))return n(i(F(t,2),8));if(p(t)||s(t))return NaN;var e=A(t);return e!==t?u(e):n(t)}},5695:function(u){"use strict";u.exports=function(u){return!!u}},1200:function(u,t,e){"use strict";var r=e(6542),n=e(5693),o=e(159),D=e(1117);u.exports=function(u){var t=r(u);return o(t)||0===t?0:D(t)?n(t):t}},3995:function(u,t,e){"use strict";var r=e(5674),n=e(1200);u.exports=function(u){var t=n(u);return t<=0?0:t>r?r:t}},6542:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%Number%"),D=e(8606),i=e(703),a=e(6207);u.exports=function(u){var t=D(u)?u:i(u,o);if("symbol"==typeof t)throw new n("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new n("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?a(t):o(t)}},703:function(u,t,e){"use strict";var r=e(7358);u.exports=function(u){return arguments.length>1?r(u,arguments[1]):r(u)}},7628:function(u,t,e){"use strict";var r=e(9545),n=e(2870)("%TypeError%"),o=e(1874),D=e(5695),i=e(7304);u.exports=function(u){if("Object"!==o(u))throw new n("ToPropertyDescriptor requires an object");var t={};if(r(u,"enumerable")&&(t["[[Enumerable]]"]=D(u.enumerable)),r(u,"configurable")&&(t["[[Configurable]]"]=D(u.configurable)),r(u,"value")&&(t["[[Value]]"]=u.value),r(u,"writable")&&(t["[[Writable]]"]=D(u.writable)),r(u,"get")){var e=u.get;if(void 0!==e&&!i(e))throw new n("getter must be a function");t["[[Get]]"]=e}if(r(u,"set")){var a=u.set;if(void 0!==a&&!i(a))throw new n("setter must be a function");t["[[Set]]"]=a}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new n("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},5128:function(u,t,e){"use strict";var r=e(2870),n=r("%String%"),o=r("%TypeError%");u.exports=function(u){if("symbol"==typeof u)throw new o("Cannot convert a Symbol value to a string");return n(u)}},1874:function(u,t,e){"use strict";var r=e(6101);u.exports=function(u){return"symbol"==typeof u?"Symbol":"bigint"==typeof u?"BigInt":r(u)}},1751:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%String.fromCharCode%"),D=e(5541),i=e(959);u.exports=function(u,t){if(!D(u)||!i(t))throw new n("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(u)+o(t)}},3567:function(u,t,e){"use strict";var r=e(1874),n=Math.floor;u.exports=function(u){return"BigInt"===r(u)?u:n(u)}},5693:function(u,t,e){"use strict";var r=e(2870),n=e(3567),o=r("%TypeError%");u.exports=function(u){if("number"!=typeof u&&"bigint"!=typeof u)throw new o("argument must be a Number or a BigInt");var t=u<0?-n(-u):n(u);return 0===t?0:t}},9572:function(u,t,e){"use strict";var r=e(2870)("%TypeError%");u.exports=function(u,t){if(null==u)throw new r(t||"Cannot call method on "+u);return u}},6101:function(u){"use strict";u.exports=function(u){return null===u?"Null":void 0===u?"Undefined":"function"==typeof u||"object"==typeof u?"Object":"number"==typeof u?"Number":"boolean"==typeof u?"Boolean":"string"==typeof u?"String":void 0}},6740:function(u,t,e){"use strict";u.exports=e(2870)},2860:function(u,t,e){"use strict";var r=e(229),n=e(2870),o=r()&&n("%Object.defineProperty%",!0),D=r.hasArrayLengthDefineBug(),i=D&&e(2403),a=e(3099)("Object.prototype.propertyIsEnumerable");u.exports=function(u,t,e,r,n,c){if(!o){if(!u(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(n in r&&a(r,n)!==!!c["[[Enumerable]]"])return!1;var F=c["[[Value]]"];return r[n]=F,t(r[n],F)}return D&&"length"===n&&"[[Value]]"in c&&i(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,n,e(c)),!0)}},2403:function(u,t,e){"use strict";var r=e(2870)("%Array%"),n=!r.isArray&&e(3099)("Object.prototype.toString");u.exports=r.isArray||function(u){return"[object Array]"===n(u)}},1489:function(u,t,e){"use strict";var r=e(2870),n=r("%TypeError%"),o=r("%SyntaxError%"),D=e(9545),i=e(2990),a={"Property Descriptor":function(u){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!u)return!1;for(var e in u)if(D(u,e)&&!t[e])return!1;var r=D(u,"[[Value]]"),o=D(u,"[[Get]]")||D(u,"[[Set]]");if(r&&o)throw new n("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":e(900),"Iterator Record":function(u){return D(u,"[[Iterator]]")&&D(u,"[[NextMethod]]")&&D(u,"[[Done]]")},"PromiseCapability Record":function(u){return!!u&&D(u,"[[Resolve]]")&&"function"==typeof u["[[Resolve]]"]&&D(u,"[[Reject]]")&&"function"==typeof u["[[Reject]]"]&&D(u,"[[Promise]]")&&u["[[Promise]]"]&&"function"==typeof u["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(u){return!!u&&D(u,"[[Completion]]")&&D(u,"[[Capability]]")&&a["PromiseCapability Record"](u["[[Capability]]"])},"RegExp Record":function(u){return u&&D(u,"[[IgnoreCase]]")&&"boolean"==typeof u["[[IgnoreCase]]"]&&D(u,"[[Multiline]]")&&"boolean"==typeof u["[[Multiline]]"]&&D(u,"[[DotAll]]")&&"boolean"==typeof u["[[DotAll]]"]&&D(u,"[[Unicode]]")&&"boolean"==typeof u["[[Unicode]]"]&&D(u,"[[CapturingGroupsCount]]")&&"number"==typeof u["[[CapturingGroupsCount]]"]&&i(u["[[CapturingGroupsCount]]"])&&u["[[CapturingGroupsCount]]"]>=0}};u.exports=function(u,t,e,r){var D=a[t];if("function"!=typeof D)throw new o("unknown record type: "+t);if("Object"!==u(r)||!D(r))throw new n(e+" must be a "+t)}},7735:function(u){"use strict";u.exports=function(u,t){for(var e=0;e=55296&&u<=56319}},900:function(u,t,e){"use strict";var r=e(9545);u.exports=function(u){return r(u,"[[StartIndex]]")&&r(u,"[[EndIndex]]")&&u["[[StartIndex]]"]>=0&&u["[[EndIndex]]"]>=u["[[StartIndex]]"]&&String(parseInt(u["[[StartIndex]]"],10))===String(u["[[StartIndex]]"])&&String(parseInt(u["[[EndIndex]]"],10))===String(u["[[EndIndex]]"])}},159:function(u){"use strict";u.exports=Number.isNaN||function(u){return u!=u}},8606:function(u){"use strict";u.exports=function(u){return null===u||"function"!=typeof u&&"object"!=typeof u}},7999:function(u,t,e){"use strict";var r=e(2870),n=e(9545),o=r("%TypeError%");u.exports=function(u,t){if("Object"!==u.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(n(t,r)&&!e[r])return!1;if(u.IsDataDescriptor(t)&&u.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(u){"use strict";u.exports=function(u){return"number"==typeof u&&u>=56320&&u<=57343}},5674:function(u){"use strict";u.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},t={};function e(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return u[r](o,o.exports,e),o.exports}e.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return e.d(t,{a:t}),t},e.d=function(u,t){for(var r in t)e.o(t,r)&&!e.o(u,r)&&Object.defineProperty(u,r,{enumerable:!0,get:t[r]})},e.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},function(){"use strict";var u=e(1844);function t(t,e,r){for(var n=0,o=[];-1!==n;)-1!==(n=t.indexOf(e,n))&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,u.Z)(t,e,r)}function r(u,e){return 0===e.length||0===u.length?0:1-t(u,e,e.length)[0].errors/e.length}function n(u){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n(u)}function o(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1?t-1:0),r=1;ro?(i.push({node:n,offset:o-c}),o=e.shift()):(a=D.nextNode(),c+=n.data.length);for(;void 0!==o&&n&&c===o;)i.push({node:n,offset:n.data.length}),o=e.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return i}var f=function(){function u(t,e){if(D(this,u),e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}return a(u,[{key:"relativeTo",value:function(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");for(var e=this.element,r=this.offset;e!==t;)r+=F(e),e=e.parentElement;return new u(e,r)}},{key:"resolve",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return l(this.element,this.offset)[0]}catch(n){if(0===this.offset&&void 0!==u.direction){var t=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);t.currentNode=this.element;var e=1===u.direction,r=e?t.nextNode():t.previousNode();if(!r)throw n;return{node:r,offset:e?0:r.data.length}}throw n}}}],[{key:"fromCharOffset",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}},{key:"fromPoint",value:function(t,e){switch(t.nodeType){case Node.TEXT_NODE:if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");var r=F(t)+e;return new u(t.parentElement,r);case Node.ELEMENT_NODE:if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");for(var n=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};C(this,u),this.root=t,this.exact=e,this.context=r}return d(u,[{key:"toSelector",value:function(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}},{key:"toRange",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(u).toRange()}},{key:"toPositionAnchor",value:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(u,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return null;var o=Math.min(256,e.length/2),D=t(u,e,o);if(0===D.length)return null;var i=function(t){var o=1-t.errors/e.length,D=n.prefix?r(u.slice(Math.max(0,t.start-n.prefix.length),t.start),n.prefix):1,i=n.suffix?r(u.slice(t.end,t.end+n.suffix.length),n.suffix):1,a=1;return"number"==typeof n.hint&&(a=1-Math.abs(t.start-n.hint)/u.length),(50*o+20*D+20*i+2*a)/92},a=D.map((function(u){return{start:u.start,end:u.end,score:i(u)}}));return a.sort((function(u,t){return t.score-u.score})),a[0]}(this.root.textContent,this.exact,E(E({},this.context),{},{hint:u.hint}));if(!e)throw new Error("Quote not found");return new B(this.root,e.start,e.end)}}],[{key:"fromRange",value:function(t,e){var r=t.textContent,n=s.fromRange(e).relativeTo(t),o=n.start.offset,D=n.end.offset;return new u(t,r.slice(o,D),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(D,Math.min(r.length,D+32))})}},{key:"fromSelector",value:function(t,e){var r=e.prefix,n=e.suffix;return new u(t,e.exact,{prefix:r,suffix:n})}}]),u}();function m(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e.1&&(t?t.remove():((t=document.createElement("div")).setAttribute("id",u),t.style.breakBefore="column",t.innerHTML="​",document.body.appendChild(t)))}}(),P()}))})).observe(document.body)}),!1);var b=1;function v(){var u=document.documentElement.style;return"readium-scroll-on"==u.getPropertyValue("--USER__view").trim()||"readium-scroll-on"==u.getPropertyValue("--USER__scroll").trim()}function w(){return"rtl"==document.body.dir.toLowerCase()}function x(){return window.getComputedStyle(document.documentElement).getPropertyValue("writing-mode").startsWith("vertical")}function S(u){return v()?document.scrollingElement.scrollTop=u.top+window.scrollY:document.scrollingElement.scrollLeft=j(u.left+window.scrollX),!0}function O(u){if(v())throw"Called scrollToOffset() with scroll mode enabled. This can only be used in paginated mode.";var t=window.scrollX;return document.scrollingElement.scrollLeft=j(u),Math.abs(t-u)/b>.01}function j(u){var t=u+(w()?-1:1);return t-t%b}function P(){if(!v()){var u=window.scrollX,t=(w()?-1:1)*(b/2);document.scrollingElement.scrollLeft=j(u+t)}}function T(u){try{var t,e=u.locations,r=u.text;if(r&&r.highlight)return e&&e.cssSelector&&(t=document.querySelector(e.cssSelector)),t||(t=document.body),new g(t,r.highlight,{prefix:r.before,suffix:r.after}).toRange();if(e){var n=null;if(!n&&e.cssSelector&&(n=document.querySelector(e.cssSelector)),!n&&e.fragments){var o,D=function(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return m(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}(e.fragments);try{for(D.s();!(o=D.n()).done;){var i=o.value;if(n=document.getElementById(i))break}}catch(u){D.e(u)}finally{D.f()}}if(n){var a=document.createRange();return a.setStartBefore(n),a.setEndAfter(n),a}}}catch(u){M(u)}return null}function I(u,t){null===t||""===t?R(u):document.documentElement.style.setProperty(u,t,"important")}function R(u){document.documentElement.style.removeProperty(u)}function N(){var u=Array.prototype.slice.call(arguments).join(" ");Android.log(u)}function M(u){Android.logError(u,"",0)}function k(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=function(u,t){if(u){if("string"==typeof u)return L(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?L(u,t):void 0}}(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e1&&o.height>1){var D,i=k(u);try{for(i.s();!(D=i.n()).done;){var a=D.value;if(o!==a&&r.has(a)&&V(a,o,1)){J("CLIENT RECT: remove contained"),r.delete(o);break}}}catch(u){i.e(u)}finally{i.f()}}else J("CLIENT RECT: remove tiny"),r.delete(o)}}catch(u){n.e(u)}finally{n.f()}return Array.from(r)}(W(r,1,t)),i=q(D),a=i.length-1;a>=0;a--){var c=i[a];if(!(c.width*c.height>4)){if(!(i.length>1)){J("CLIENT RECT: remove small, but keep otherwise empty!");break}J("CLIENT RECT: remove small"),i.splice(a,1)}}return J("CLIENT RECT: reduced ".concat(r.length," --\x3e ").concat(i.length)),i}function W(u,t,e){for(var r=0;rt||z(u.right,t,r))&&(u.tope||z(u.bottom,e,r))}function q(u){for(var t=0;t=0&&z(u.left,t.right,e))&&(t.left=0&&z(t.left,u.right,e))&&(u.top=0&&z(u.top,t.bottom,e))&&(t.top=0&&z(t.top,u.bottom,e))}function z(u,t,e){return Math.abs(u-t)<=e}function J(){$&&N.apply(null,arguments)}function K(u,t){var e="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(!e){if(Array.isArray(u)||(e=Q(u))||t&&u&&"number"==typeof u.length){e&&(u=e);var r=0,n=function(){};return{s:n,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(u){throw u},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,D=!0,i=!1;return{s:function(){e=e.call(u)},n:function(){var u=e.next();return D=u.done,u},e:function(u){i=!0,o=u},f:function(){try{D||null==e.return||e.return()}finally{if(i)throw o}}}}function Z(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var e=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=e){var r,n,o,D,i=[],a=!0,c=!1;try{if(o=(e=e.call(u)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=o.call(e)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(u){c=!0,n=u}finally{try{if(!a&&null!=e.return&&(D=e.return(),Object(D)!==D))return}finally{if(c)throw n}}return i}}(u,t)||Q(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(u,t){if(u){if("string"==typeof u)return uu(u,t);var e=Object.prototype.toString.call(u).slice(8,-1);return"Object"===e&&u.constructor&&(e=u.constructor.name),"Map"===e||"Set"===e?Array.from(u):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?uu(u,t):void 0}}function uu(u,t){(null==t||t>u.length)&&(t=u.length);for(var e=0,r=new Array(t);e "},Du={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},iu="CssSelectorGenerator";function au(u="unknown problem",...t){console.warn(`${iu}: ${u}`,...t)}const cu={selectors:[Du.id,Du.class,Du.tag,Du.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Fu(u){return u instanceof RegExp}function lu(u){return["string","function"].includes(typeof u)||Fu(u)}function fu(u){return Array.isArray(u)?u.filter(lu):[]}function su(u){const t=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(u){return u instanceof Node}(u)&&t.includes(u.nodeType)}function pu(u,t){if(su(u))return u.contains(t)||au("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),u;const e=t.getRootNode({composed:!1});return su(e)?(e!==document&&au("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),e):t.ownerDocument.querySelector(":root")}function Au(u){return"number"==typeof u?u:Number.POSITIVE_INFINITY}function Eu(u=[]){const[t=[],...e]=u;return 0===e.length?t:e.reduce(((u,t)=>u.filter((u=>t.includes(u)))),t)}function Cu(u){return[].concat(...u)}function yu(u){const t=u.map((u=>{if(Fu(u))return t=>u.test(t);if("function"==typeof u)return t=>{const e=u(t);return"boolean"!=typeof e?(au("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",u),!1):e};if("string"==typeof u){const t=new RegExp("^"+u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return u=>t.test(u)}return au("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",u),()=>!1}));return u=>t.some((t=>t(u)))}function du(u,t,e){const r=Array.from(pu(e,u[0]).querySelectorAll(t));return r.length===u.length&&u.every((u=>r.includes(u)))}function hu(u,t){t=null!=t?t:function(u){return u.ownerDocument.querySelector(":root")}(u);const e=[];let r=u;for(;nu(r)&&r!==t;)e.push(r),r=r.parentElement;return e}function Bu(u,t){return Eu(u.map((u=>hu(u,t))))}const gu=new RegExp(["^$","\\s"].join("|")),mu=new RegExp(["^$"].join("|")),bu=[Du.nthoftype,Du.tag,Du.id,Du.class,Du.attribute,Du.nthchild],vu=yu(["class","id","ng-*"]);function wu({name:u}){return`[${u}]`}function xu({name:u,value:t}){return`[${u}='${t}']`}function Su({nodeName:u,nodeValue:t}){return{name:(e=u,e.replace(/:/g,"\\:")),value:Uu(t)};var e}function Ou(u){const t=Array.from(u.attributes).filter((t=>function({nodeName:u},t){const e=t.tagName.toLowerCase();return!(["input","option"].includes(e)&&"value"===u||vu(u))}(t,u))).map(Su);return[...t.map(wu),...t.map(xu)]}function ju(u){return(u.getAttribute("class")||"").trim().split(/\s+/).filter((u=>!mu.test(u))).map((u=>`.${Uu(u)}`))}function Pu(u){const t=u.getAttribute("id")||"",e=`#${Uu(t)}`,r=u.getRootNode({composed:!1});return!gu.test(t)&&du([u],e,r)?[e]:[]}function Tu(u){const t=u.parentNode;if(t){const e=Array.from(t.childNodes).filter(nu).indexOf(u);if(e>-1)return[`:nth-child(${e+1})`]}return[]}function Iu(u){return[Uu(u.tagName.toLowerCase())]}function Ru(u){const t=[...new Set(Cu(u.map(Iu)))];return 0===t.length||t.length>1?[]:[t[0]]}function Nu(u){const t=Ru([u])[0],e=u.parentElement;if(e){const r=Array.from(e.children).filter((u=>u.tagName.toLowerCase()===t)),n=r.indexOf(u);if(n>-1)return[`${t}:nth-of-type(${n+1})`]}return[]}function Mu(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){return Array.from(function*(u=[],{maxResults:t=Number.POSITIVE_INFINITY}={}){let e=0,r=Lu(1);for(;r.length<=u.length&&eu[t]));yield t,r=ku(r,u.length-1)}}(u,{maxResults:t}))}function ku(u=[],t=0){const e=u.length;if(0===e)return[];const r=[...u];r[e-1]+=1;for(let u=e-1;u>=0;u--)if(r[u]>t){if(0===u)return Lu(e+1);r[u-1]++,r[u]=r[u-1]+1}return r[e-1]>t?Lu(e+1):r}function Lu(u=1){return Array.from(Array(u).keys())}const $u=":".charCodeAt(0).toString(16).toUpperCase(),_u=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Uu(u=""){var t,e;return null!==(e=null===(t=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===t?void 0:t.call(CSS,u))&&void 0!==e?e:function(u=""){return u.split("").map((u=>":"===u?`\\${$u} `:_u.test(u)?`\\${u}`:escape(u).replace(/%/g,"\\"))).join("")}(u)}const Wu={tag:Ru,id:function(u){return 0===u.length||u.length>1?[]:Pu(u[0])},class:function(u){return Eu(u.map(ju))},attribute:function(u){return Eu(u.map(Ou))},nthchild:function(u){return Eu(u.map(Tu))},nthoftype:function(u){return Eu(u.map(Nu))}},Gu={tag:Iu,id:Pu,class:ju,attribute:Ou,nthchild:Tu,nthoftype:Nu};function Vu(u){return u.includes(Du.tag)||u.includes(Du.nthoftype)?[...u]:[...u,Du.tag]}function Hu(u={}){const t=[...bu];return u[Du.tag]&&u[Du.nthoftype]&&t.splice(t.indexOf(Du.tag),1),t.map((t=>{return(r=u)[e=t]?r[e].join(""):"";var e,r})).join("")}function qu(u,t,e="",r){const n=function(u,t){return""===t?u:function(u,t){return[...u.map((u=>t+ou.DESCENDANT+u)),...u.map((u=>t+ou.CHILD+u))]}(u,t)}(function(u,t,e){const r=function(u,t){const{blacklist:e,whitelist:r,combineWithinSelector:n,maxCombinations:o}=t,D=yu(e),i=yu(r);return function(u){const{selectors:t,includeTag:e}=u,r=[].concat(t);return e&&!r.includes("tag")&&r.push("tag"),r}(t).reduce(((t,e)=>{const r=function(u,t){var e;return(null!==(e=Wu[t])&&void 0!==e?e:()=>[])(u)}(u,e),a=function(u=[],t,e){return u.filter((u=>e(u)||!t(u)))}(r,D,i),c=function(u=[],t){return u.sort(((u,e)=>{const r=t(u),n=t(e);return r&&!n?-1:!r&&n?1:0}))}(a,i);return t[e]=n?Mu(c,{maxResults:o}):c.map((u=>[u])),t}),{})}(u,e),n=function(u,t){return function(u){const{selectors:t,combineBetweenSelectors:e,includeTag:r,maxCandidates:n}=u,o=e?Mu(t,{maxResults:n}):t.map((u=>[u]));return r?o.map(Vu):o}(t).map((t=>function(u,t){const e={};return u.forEach((u=>{const r=t[u];r.length>0&&(e[u]=r)})),function(u={}){let t=[];return Object.entries(u).forEach((([u,e])=>{t=e.flatMap((e=>0===t.length?[{[u]:e}]:t.map((t=>Object.assign(Object.assign({},t),{[u]:e})))))})),t}(e).map(Hu)}(t,u))).filter((u=>u.length>0))}(r,e),o=Cu(n);return[...new Set(o)]}(u,r.root,r),e);for(const t of n)if(du(u,t,r.root))return t;return null}function Xu(u){return{value:u,include:!1}}function Yu({selectors:u,operator:t}){let e=[...bu];u[Du.tag]&&u[Du.nthoftype]&&(e=e.filter((u=>u!==Du.tag)));let r="";return e.forEach((t=>{(u[t]||[]).forEach((({value:u,include:t})=>{t&&(r+=u)}))})),t+r}function zu(u){return[":root",...hu(u).reverse().map((u=>{const t=function(u,t,e=ou.NONE){const r={};return t.forEach((t=>{Reflect.set(r,t,function(u,t){return Gu[t](u)}(u,t).map(Xu))})),{element:u,operator:e,selectors:r}}(u,[Du.nthchild],ou.CHILD);return t.selectors.nthchild.forEach((u=>{u.include=!0})),t})).map(Yu)].join("")}function Ju(u,t={}){const e=function(u){(u instanceof NodeList||u instanceof HTMLCollection)&&(u=Array.from(u));const t=(Array.isArray(u)?u:[u]).filter(nu);return[...new Set(t)]}(u),r=function(u,t={}){const e=Object.assign(Object.assign({},cu),t);return{selectors:(r=e.selectors,Array.isArray(r)?r.filter((u=>{return t=Du,e=u,Object.values(t).includes(e);var t,e})):[]),whitelist:fu(e.whitelist),blacklist:fu(e.blacklist),root:pu(e.root,u),combineWithinSelector:!!e.combineWithinSelector,combineBetweenSelectors:!!e.combineBetweenSelectors,includeTag:!!e.includeTag,maxCombinations:Au(e.maxCombinations),maxCandidates:Au(e.maxCandidates)};var r}(e[0],t);let n="",o=r.root;function D(){return function(u,t,e="",r){if(0===u.length)return null;const n=[u.length>1?u:[],...Bu(u,t).map((u=>[u]))];for(const u of n){const t=qu(u,0,e,r);if(t)return{foundElements:u,selector:t}}return null}(e,o,n,r)}let i=D();for(;i;){const{foundElements:u,selector:t}=i;if(du(e,t,r.root))return t;o=u[0],n=t,i=D()}return e.length>1?e.map((u=>Ju(u,r))).join(", "):function(u){return u.map(zu).join(", ")}(e)}function Ku(u){return null==u?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(u.nodeName.toLowerCase())||u.hasAttribute("contenteditable")&&"false"!=u.getAttribute("contenteditable").toLowerCase()?u.outerHTML:u.parentElement?Ku(u.parentElement):null}function Zu(u){for(var t=0;t0&&t.top0&&t.left=6||Math.abs(t.offsetY)>=6)&&(e=!1,n=Android.onDragStart(JSON.stringify(t))):n=Android.onDragMove(JSON.stringify(t)),n&&(u.stopPropagation(),u.preventDefault())}}),{passive:!1});var t=void 0,e=!1,r=window.devicePixelRatio}(document)})),window.addEventListener("keydown",(function(u){et(u)||(rt(u),nt(u,"down"))})),window.addEventListener("keyup",(function(u){et(u)||(rt(u),nt(u,"up"))}));var ot=e(5155);e.n(ot)().shim();var Dt=!0;function it(){Dt&&N.apply(null,arguments)}window.addEventListener("load",(function(){var u=!1;document.addEventListener("selectionchange",(function(){var t=window.getSelection().isCollapsed;t&&u?(u=!1,Android.onSelectionEnd(),P()):t||u||(u=!0,Android.onSelectionStart())}))}),!1),window.readium={scrollToId:function(u){var t=document.getElementById(u);return!!t&&S(t.getBoundingClientRect())},scrollToPosition:function(u){if(u<0||u>1)throw"scrollToPosition() must be given a position from 0.0 to 1.0";var t;v()?x()?(t=document.scrollingElement.scrollWidth*u,document.scrollingElement.scrollLeft=-t):(t=document.scrollingElement.scrollHeight*u,document.scrollingElement.scrollTop=t):(t=document.scrollingElement.scrollWidth*u*(w()?-1:1),document.scrollingElement.scrollLeft=j(t))},scrollToLocator:function(u){var t=T(u);return!!t&&function(u){return S(u.getBoundingClientRect())}(t)},scrollLeft:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX-b,e=w()?-(u-b):0;return O(Math.max(t,e))},scrollRight:function(){var u=document.scrollingElement.scrollWidth,t=window.scrollX+b,e=w()?0:u-b;return O(Math.min(t,e))},scrollToStart:function(){v()&&!x()?document.scrollingElement.scrollTop=0:document.scrollingElement.scrollLeft=0},scrollToEnd:function(){var u=document.scrollingElement;if(v())x()?u.scrollLeft=-document.scrollingElement.scrollWidth:u.scrollTop=document.body.scrollHeight;else{var t=w()?-1:1;u.scrollLeft=j(u.scrollWidth*t)}},setCSSProperties:function(u){for(var t in u)I(t,u[t])},setProperty:I,removeProperty:R,getCurrentSelection:function(){var u=function(){var u=window.getSelection();if(u&&!u.isCollapsed){var t=u.toString();if(0!==t.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length&&u.anchorNode&&u.focusNode){var e=1===u.rangeCount?u.getRangeAt(0):function(u,t,e,r){var n=new Range;if(n.setStart(u,t),n.setEnd(e,r),!n.collapsed)return n;it(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");var o=new Range;if(o.setStart(e,r),o.setEnd(u,t),!o.collapsed)return it(">>> createOrderedRange RANGE REVERSE OK."),n;it(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(u.anchorNode,u.anchorOffset,u.focusNode,u.focusOffset);if(e&&!e.collapsed){var r=document.body.textContent,n=s.fromRange(e).relativeTo(document.body),o=n.start.offset,D=n.end.offset,i=r.slice(Math.max(0,o-200),o),a=i.search(/(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uA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FF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\u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uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/g);-1!==a&&(i=i.slice(a+1));var c=r.slice(D,Math.min(r.length,D+200)),F=Array.from(c.matchAll(/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3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uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9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C-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)).pop();return void 0!==F&&F.index>1&&(c=c.slice(0,F.index+1)),{highlight:t,before:i,after:c}}it("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!")}}}();return u?{text:u,rect:function(){try{var u=window.getSelection();if(!u)return;return _(u.getRangeAt(0).getBoundingClientRect())}catch(u){return M(u),null}}()}:null},registerDecorationTemplates:function(u){for(var t="",e=0,r=Object.entries(u);e Date: Mon, 9 Feb 2026 16:39:34 +0100 Subject: [PATCH 55/56] Small fixes --- .../src/bridge/reflowable-move-bridge.ts | 13 +++++++++---- .../generated/reflowable-injectable-script.js | 2 +- .../reflowable-injectable-script.js.map | 2 +- .../reflowable/ReflowableWebRenditionState.kt | 19 +++++++++++++------ 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts index de52de5792..b1669d62ce 100644 --- a/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts +++ b/readium/navigators/web/internals/scripts/src/bridge/reflowable-move-bridge.ts @@ -35,15 +35,20 @@ export class ReflowableMoveBridge { textAfter: string, vertical: boolean ): number | null { - const root = document.body + const root = this.document.body const anchor = new TextQuoteAnchor(root, "", { prefix: textBefore, suffix: textAfter, }) - const range = anchor.toRange() - return this.getOffsetForRect(range.getBoundingClientRect(), vertical) + try { + const range = anchor.toRange() + return this.getOffsetForRect(range.getBoundingClientRect(), vertical) + } catch (e) { + log(e) + return null + } } private getOffsetForCssSelector( @@ -52,7 +57,7 @@ export class ReflowableMoveBridge { ): number | null { let element try { - element = document.querySelector(cssSelector) + element = this.document.querySelector(cssSelector) } catch (e) { log(e) } diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js index 8cefd57064..ee8e592059 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js @@ -1,2 +1,2 @@ -!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?M(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?M(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,d=u?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,m=(u?d:h)/g;function b(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${m}px`;const r=Math.floor(e.top/m)*m;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${m}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/m)*m;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,b(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e?e instanceof HTMLAnchorElement&&(this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()):(r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t))}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class ${constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,e,r){const n=document.body,o=new P(n,"",{prefix:t,suffix:e}).toRange();return this.getOffsetForRect(o.getBoundingClientRect(),r)}getOffsetForCssSelector(t,r){let n;try{n=document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); +!function(){var t={1844:function(t,e){"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],s=o>>>31,c=e[r]|s,u=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=s)|~(u|(f|=n(o)-s)),a=f&u,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,s={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};s.lastRowMask.fill(1<<31),s.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),u=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(h[d]|=1<0&&w[b]>=r+i;)b-=1;b===a&&w[b]<=r&&(w[b]-1?o(r):r}},2755:function(t,e,r){"use strict";var n=r(3569),o=r(2870),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);return c&&u&&c(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var f=function(){return s(n,i,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},6663:function(t,e,r){"use strict";var n=r(229)(),o=r(2870),i=n&&o("%Object.defineProperty%",!0),a=o("%SyntaxError%"),s=o("%TypeError%"),c=r(658);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9722:function(t,e,r){"use strict";var n=r(2051),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(6663),c=r(229)(),u=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?s(t,e,r,!0):s(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},7358:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(7959),i=r(3655),a=r(455),s=r(8760);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):s(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||s(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,s="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===j(/^%?[^%]*%?$/,t))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=O(t,0,1),r=O(t,-1);if("%"===e&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,P,(function(t,e,r,o){n[n.length]=r?A(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=C("%"+n+"%",e),s=i.name,u=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,S([0,1],f)));for(var p=1,y=!0;p=r.length){var b=c(u,h);u=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[h]}else y=x(u,h),u=u[h];y&&!l&&(g[s]=u)}}return u}},658:function(t,e,r){"use strict";var n=r(2870)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},229:function(t,e,r){"use strict";var n=r(2870)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},3413:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1143:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(9985);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9985:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3060:function(t,e,r){"use strict";var n=r(9985);t.exports=function(){return n()&&!!Symbol.toStringTag}},9545:function(t){"use strict";var e={}.hasOwnProperty,r=Function.prototype.call;t.exports=r.bind?r.bind(e):function(t,n){return r.call(e,t,n)}},7284:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=r(5714)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");if(i.assert(t),!s.has(t,e))throw new a("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=i.get(t);return!!r&&o(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=i.get(t);n||(n={},i.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},3655:function(t){"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},455:function(t,e,r){"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(3060)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},5494:function(t,e,r){"use strict";var n,o,i,a,s=r(3099),c=r(3060)();if(c){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var u=function(){throw i};a={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=u)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},8760:function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(1143)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4538:function(t,e,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,$=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return w.call(o,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var D=r(7002),F=D.custom,k=_(F)?F:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function L(t){return w.call(String(t),/"/g,""")}function W(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function _(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,n,o){var s=r||{};if(V(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return d?M(e,v):v}if("bigint"==typeof e){var S=String(e)+"n";return d?M(e,S):S}var j=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var R,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(s,n);if(void 0===o)o=[];else if(q(o,e)>=0)return"[Circular]";function G(e,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:s.depth};return V(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,n+1,o)}return t(e,s,n+1,o)}if("function"==typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Q(e,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+A.call(tt,", ")+" }":"")}if(_(e)){var et=T?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(e);return"object"!=typeof e||T?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),nt=e.attributes||[],ot=0;ot"}if(W(e)){if(0===e.length)return"[]";var it=Q(e,G);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(it)?"["+Z(it,F)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var at=Q(e,G);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(at,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+G(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(k&&"function"==typeof e[k]&&D)return D(e,{depth:j-n});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a&&a.call(e,(function(t,r){st.push(G(r,e,!0)+" => "+G(t,e))})),Y("Map",i.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return l&&l.call(e,(function(t){ct.push(G(t,e))})),Y("Set",u.call(e),ct,F)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return J(G(P.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return J(G(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!U(e)){var ut=Q(e,G),lt=$?$(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",pt=!lt&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):ft?"Object":"",yt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ft?"["+A.call(E.call([],pt||[],ft||[]),": ")+"] ":"");return 0===ut.length?yt+"{}":F?yt+"{"+Z(ut,F)+"}":yt+"{ "+A.call(ut,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return G.call(t,e)}function H(t){return d.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(b.call(t,0,e.maxStringLength),e)+n}return B(w.call(w.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function J(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Y(t,e,r,n){return t+" ("+e+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Q(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o0&&!o.call(t,0))for(var d=0;d0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},9766:function(t,e,r){"use strict";var n=r(8921),o=Object,i=TypeError;t.exports=n((function(){if(null!=this&&this!==o(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},483:function(t,e,r){"use strict";var n=r(9722),o=r(2755),i=r(9766),a=r(5113),s=r(7299),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},5113:function(t,e,r){"use strict";var n=r(9766),o=r(9722).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},7299:function(t,e,r){"use strict";var n=r(9722).supportsDescriptors,o=r(5113),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,c=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!n||!c)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(u),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},7582:function(t,e,r){"use strict";var n=r(3099),o=r(2870),i=r(5494),a=n("RegExp.prototype.exec"),s=o("%TypeError%");t.exports=function(t){if(!i(t))throw new s("`regex` must be a RegExp");return function(e){return null!==a(t,e)}}},8921:function(t,e,r){"use strict";var n=r(6663),o=r(229)(),i=r(5610).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},5714:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=r(4538),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),d=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return u(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=d(t,e);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return h(e,n)}else if(r)return function(t,e){return!!d(t,e)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new s),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=d(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},3073:function(t,e,r){"use strict";var n=r(7113),o=r(151),i=r(1959),a=r(9497),s=r(5128),c=r(6751),u=r(3099),l=r(1143)(),f=r(483),p=u("String.prototype.indexOf"),y=r(2009),h=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(s(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=h(t);if(void 0!==i)return n(i,t,[e])}var u=s(e),l=new RegExp(t,"g");return n(h(l),l,[u])}},5155:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(3073),a=r(1794),s=r(3911),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:s}),t.exports=c},2009:function(t,e,r){"use strict";var n=r(1143)(),o=r(8012);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},1794:function(t,e,r){"use strict";var n=r(3073);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},8012:function(t,e,r){"use strict";var n=r(1398),o=r(151),i=r(8322),a=r(2449),s=r(3995),c=r(5128),u=r(1874),l=r(483),f=r(8921),p=r(3099)("String.prototype.indexOf"),y=RegExp,h="flags"in RegExp.prototype,d=f((function(t){var e=this;if("Object"!==u(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(h&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),d=f.flags,g=f.matcher,m=s(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(d,"g")>-1,w=p(d,"u")>-1;return n(g,r,b,w)}),"[Symbol.matchAll]",!0);t.exports=d},3911:function(t,e,r){"use strict";var n=r(9722),o=r(1143)(),i=r(1794),a=r(2009),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),s&&c){var r=c(Symbol,e);r&&!r.configurable||s(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var u=a(),l={};l[e]=u;var f={};f[e]=function(){return RegExp.prototype[e]!==u},n(RegExp.prototype,l,f)}return t}},8125:function(t,e,r){"use strict";var n=r(6751),o=r(5128),i=r(3099)("String.prototype.replace"),a=/^\s$/.test("᠎"),s=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,s,""),c,"")}},9434:function(t,e,r){"use strict";var n=r(2755),o=r(9722),i=r(6751),a=r(8125),s=r(3228),c=r(818),u=n(s()),l=function(t){return i(t),u(t)};o(l,{getPolyfill:s,implementation:a,shim:c}),t.exports=l},3228:function(t,e,r){"use strict";var n=r(8125);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},818:function(t,e,r){"use strict";var n=r(9722),o=r(3228);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},7002:function(){},1510:function(t,e,r){"use strict";var n=r(2870),o=r(6318),i=r(1874),a=r(2990),s=r(5674),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>s)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},7113:function(t,e,r){"use strict";var n=r(2870),o=r(3099),i=n("%TypeError%"),a=r(6287),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(t,e,r)}},6318:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099),i=r(5541),a=r(959),s=r(1874),c=r(1751),u=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==s(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=u(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=l(t,e+1);return a(h)?{"[[CodePoint]]":c(o,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},5702:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(1874);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},6782:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(2860),i=r(8357),a=r(3301),s=r(6284),c=r(8277),u=r(1874);t.exports=function(t,e,r){if("Object"!==u(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},1398:function(t,e,r){"use strict";var n=r(2870),o=r(1143)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),s=r(1510),c=r(5702),u=r(6782),l=r(151),f=r(5716),p=r(3500),y=r(8322),h=r(3995),d=r(5128),g=r(1874),m=r(7284),b=r(2263),w=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(w.prototype=f(a)),u(w.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof w&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===d(l(a,"0"))){var u=h(l(e,"lastIndex")),f=s(r,u,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(w.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof w.prototype[Symbol.iterator])&&u(w.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new w(t,e,r,n)}},3645:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(7999),i=r(2860),a=r(8357),s=r(8355),c=r(3301),u=r(6284),l=r(8277),f=r(7628),p=r(1874);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:s},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8357:function(t,e,r){"use strict";var n=r(1489),o=r(1598),i=r(1874);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},151:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284),a=r(1874);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},1959:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(9374),i=r(7304),a=r(6284),s=r(4538);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(s(e)+" is not a function: "+s(r));return r}}},9374:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(4538),i=r(6284);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},8355:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},6287:function(t,e,r){"use strict";t.exports=r(2403)},7304:function(t,e,r){"use strict";t.exports=r(3655)},4791:function(t,e,r){"use strict";var n=r(6740)("%Reflect.construct%",!0),o=r(3645);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3301:function(t,e,r){"use strict";var n=r(9545),o=r(1874),i=r(1489);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},6284:function(t){"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},9497:function(t,e,r){"use strict";var n=r(2870)("%Symbol.match%",!0),o=r(5494),i=r(5695);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},5716:function(t,e,r){"use strict";var n=r(2870),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),s=r(6287),c=r(1874),u=r(7735),l=r(7284),f=r(3413)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!s(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&u(r,(function(t){l.set(e,t,void 0)})),e}},3500:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(3099)("RegExp.prototype.exec"),i=r(7113),a=r(151),s=r(7304),c=r(1874);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(s(r)){var u=i(r,t,[e]);if(null===u||"Object"===c(u))return u;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},6751:function(t,e,r){"use strict";t.exports=r(9572)},8277:function(t,e,r){"use strict";var n=r(159);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},8322:function(t,e,r){"use strict";var n=r(2870)("%TypeError%"),o=r(6284),i=r(8277),a=r(1874),s=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,s&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!s||i(t[e],r)}catch(t){return!1}}},2449:function(t,e,r){"use strict";var n=r(2870),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(4791),s=r(1874);t.exports=function(t,e){if("Object"!==s(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==s(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},6207:function(t,e,r){"use strict";var n=r(2870),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),c=r(3099),u=r(7582),l=c("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),y=u(/^[-+]0x[0-9a-f]+$/i),h=u(new i("["+["…","​","￾"].join("")+"]","g")),d=r(9434),g=r(1874);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(s(l(e,2),2));if(p(e))return o(s(l(e,2),8));if(h(e)||y(e))return NaN;var r=d(e);return r!==e?t(r):o(e)}},5695:function(t){"use strict";t.exports=function(t){return!!t}},1200:function(t,e,r){"use strict";var n=r(6542),o=r(5693),i=r(159),a=r(1117);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},3995:function(t,e,r){"use strict";var n=r(5674),o=r(1200);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},6542:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%Number%"),a=r(8606),s=r(703),c=r(6207);t.exports=function(t){var e=a(t)?t:s(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},703:function(t,e,r){"use strict";var n=r(7358);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},7628:function(t,e,r){"use strict";var n=r(9545),o=r(2870)("%TypeError%"),i=r(1874),a=r(5695),s=r(7304);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!s(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!s(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5128:function(t,e,r){"use strict";var n=r(2870),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},1874:function(t,e,r){"use strict";var n=r(6101);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},1751:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(5541),s=r(959);t.exports=function(t,e){if(!a(t)||!s(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},3567:function(t,e,r){"use strict";var n=r(1874),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},5693:function(t,e,r){"use strict";var n=r(2870),o=r(3567),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},9572:function(t,e,r){"use strict";var n=r(2870)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},6101:function(t){"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},6740:function(t,e,r){"use strict";t.exports=r(2870)},2860:function(t,e,r){"use strict";var n=r(229),o=r(2870),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),s=a&&r(2403),c=r(3099)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,u){if(!i){if(!t(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!u["[[Enumerable]]"])return!1;var l=u["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in u&&s(n)&&n.length!==u["[[Value]]"]?(n.length=u["[[Value]]"],n.length===u["[[Value]]"]):(i(n,o,r(u)),!0)}},2403:function(t,e,r){"use strict";var n=r(2870)("%Array%"),o=!n.isArray&&r(3099)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},1489:function(t,e,r){"use strict";var n=r(2870),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(9545),s=r(2990),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(900),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&s(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},7735:function(t){"use strict";t.exports=function(t,e){for(var r=0;r=55296&&t<=56319}},900:function(t,e,r){"use strict";var n=r(9545);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},159:function(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},8606:function(t){"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},7999:function(t,e,r){"use strict";var n=r(2870),o=r(9545),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},959:function(t){"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},5674:function(t){"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";const t=!1;function e(...e){t&&console.log(...e)}function n(t,e){return{bottom:t.bottom/e,height:t.height/e,left:t.left/e,right:t.right/e,top:t.top/e,width:t.width/e}}function o(t){return{width:t.width,height:t.height,left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function i(t,r){const n=t.getClientRects(),o=[];for(const t of n)o.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const i=l(function(t,r){const n=new Set(t);for(const r of t)if(r.width>1&&r.height>1){for(const o of t)if(r!==o&&n.has(o)&&c(o,r,1)){e("CLIENT RECT: remove contained"),n.delete(r);break}}else e("CLIENT RECT: remove tiny"),n.delete(r);return Array.from(n)}(a(o,1,r)));for(let t=i.length-1;t>=0;t--){const r=i[t];if(!(r.width*r.height>4)){if(!(i.length>1)){e("CLIENT RECT: remove small, but keep otherwise empty!");break}e("CLIENT RECT: remove small"),i.splice(t,1)}}return e(`CLIENT RECT: reduced ${o.length} --\x3e ${i.length}`),i}function a(t,r,n){for(let o=0;ot!==c&&t!==u)),i=s(c,u);return o.push(i),a(o,r,n)}}return t}function s(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function c(t,e,r){return u(t,e.left,e.top,r)&&u(t,e.right,e.top,r)&&u(t,e.left,e.bottom,r)&&u(t,e.right,e.bottom,r)}function u(t,e,r,n){return(t.lefte||y(t.right,e,n))&&(t.topr||y(t.bottom,r,n))}function l(t){for(let r=0;rt!==r));return Array.prototype.push.apply(s,n),l(s)}}else e("replaceOverlapingRects rect1 === rect2 ??!")}return t}function f(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function p(t,e,r){return(t.left=0&&y(t.left,e.right,r))&&(e.left=0&&y(e.left,t.right,r))&&(t.top=0&&y(t.top,e.bottom,r))&&(e.top=0&&y(e.top,t.bottom,r))}function y(t,e,r){return Math.abs(t-e)<=r}var h,d,g=r(1844);function m(t,e,r){let n=0;const o=[];for(;-1!==n;)n=t.indexOf(e,n),-1!==n&&(o.push({start:n,end:n+e.length,errors:0}),n+=1);return o.length>0?o:(0,g.Z)(t,e,r)}function b(t,e){return 0===e.length||0===t.length?0:1-m(t,e,e.length)[0].errors/e.length}function w(t,e,r){const n=r===h.Forwards?e:e-1;if(""!==t.charAt(n).trim())return e;let o,i;if(r===h.Backwards?(o=t.substring(0,e),i=o.trimEnd()):(o=t.substring(e),i=o.trimStart()),!i.length)return-1;const a=o.length-i.length;return r===h.Backwards?e-a:e+a}function v(t,e){const r=t.commonAncestorContainer.ownerDocument.createNodeIterator(t.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=e===h.Forwards?t.startContainer:t.endContainer,o=e===h.Forwards?t.endContainer:t.startContainer;let i=r.nextNode();for(;i&&i!==n;)i=r.nextNode();e===h.Backwards&&(i=r.previousNode());let a=-1;const s=()=>{if(i=e===h.Forwards?r.nextNode():r.previousNode(),i){const t=i.textContent,r=e===h.Forwards?0:t.length;a=w(t,r,e)}};for(;i&&-1===a&&i!==o;)s();if(i&&a>=0)return{node:i,offset:a};throw new RangeError("No text nodes with non-whitespace text found in range")}function x(t){var e,r;switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return null!==(r=null===(e=t.textContent)||void 0===e?void 0:e.length)&&void 0!==r?r:0;default:return 0}}function S(t){let e=t.previousSibling,r=0;for(;e;)r+=x(e),e=e.previousSibling;return r}function E(t,...e){let r=e.shift();const n=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),o=[];let i,a=n.nextNode(),s=0;for(;void 0!==r&&a;)i=a,s+i.data.length>r?(o.push({node:i,offset:r-s}),r=e.shift()):(a=n.nextNode(),s+=i.data.length);for(;void 0!==r&&i&&s===r;)o.push({node:i,offset:i.data.length}),r=e.shift();if(void 0!==r)throw new RangeError("Offset exceeds text length");return o}!function(t){t[t.Forwards=1]="Forwards",t[t.Backwards=2]="Backwards"}(h||(h={})),function(t){t[t.FORWARDS=1]="FORWARDS",t[t.BACKWARDS=2]="BACKWARDS"}(d||(d={}));class A{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=S(e),e=e.parentElement;return new A(e,r)}resolve(t={}){try{return E(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=t.direction===d.FORWARDS,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return A.fromPoint(t,e);case Node.ELEMENT_NODE:return new A(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=S(t)+e;return new A(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n=0&&(e.setStart(t.startContainer,o.start),r=!0),o.end>0&&(e.setEnd(t.endContainer,o.end),n=!0),r&&n)return e;if(!r){const{node:t,offset:r}=v(e,h.Forwards);t&&r>=0&&e.setStart(t,r)}if(!n){const{node:t,offset:r}=v(e,h.Backwards);t&&r>0&&e.setEnd(t,r)}return e}(O.fromRange(t).toRange())}}class j{constructor(t,e,r){this.root=t,this.start=e,this.end=r}static fromRange(t,e){const r=O.fromRange(e).relativeTo(t);return new j(t,r.start.offset,r.end.offset)}static fromSelector(t,e){return new j(t,e.start,e.end)}toSelector(){return{type:"TextPositionSelector",start:this.start,end:this.end}}toRange(){return O.fromOffsets(this.root,this.start,this.end).toRange()}}class P{constructor(t,e,r={}){this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=O.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new P(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new P(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(t={}){return this.toPositionAnchor(t).toRange()}toPositionAnchor(t={}){const e=function(t,e,r={}){if(0===e.length)return null;const n=Math.min(256,e.length/2),o=m(t,e,n);if(0===o.length)return null;const i=n=>{const o=1-n.errors/e.length,i=r.prefix?b(t.slice(Math.max(0,n.start-r.prefix.length),n.start),r.prefix):1,a=r.suffix?b(t.slice(n.end,n.end+r.suffix.length),r.suffix):1;let s=1;return"number"==typeof r.hint&&(s=1-Math.abs(n.start-r.hint)/t.length),(50*o+20*i+20*a+2*s)/92},a=o.map((t=>({start:t.start,end:t.end,score:i(t)})));return a.sort(((t,e)=>e.score-t.score)),a[0]}(this.root.textContent,this.exact,Object.assign(Object.assign({},this.context),{hint:t.hint}));if(!e)throw new Error("Quote not found");return new j(this.root,e.start,e.end)}}class R{constructor(t){this.styles=new Map,this.groups=new Map,this.lastGroupId=0,this.window=t,t.addEventListener("load",(()=>{const e=t.document.body;let r={width:0,height:0};new ResizeObserver((()=>{requestAnimationFrame((()=>{r.width===e.clientWidth&&r.height===e.clientHeight||(r={width:e.clientWidth,height:e.clientHeight},this.relayoutDecorations())}))})).observe(e)}),!1)}registerTemplates(t){let e="";for(const[r,n]of t)this.styles.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){const t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}}addDecoration(t,e){console.log(`addDecoration ${t.id} ${e}`),this.getGroup(e).add(t)}removeDecoration(t,e){console.log(`removeDecoration ${t} ${e}`),this.getGroup(e).remove(t)}relayoutDecorations(){console.log("relayoutDecorations");for(const t of this.groups.values())t.relayout()}getGroup(t){let e=this.groups.get(t);if(!e){const r="readium-decoration-"+this.lastGroupId++;e=new C(r,t,this.styles),this.groups.set(t,e)}return e}handleDecorationClickEvent(t){if(0===this.groups.size)return null;const e=(()=>{for(const[e,r]of this.groups)for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements)if(u(o(r.getBoundingClientRect()),t.clientX,t.clientY,1))return{group:e,item:n,element:r}})();return e?{id:e.item.decoration.id,group:e.group,rect:o(e.item.range.getBoundingClientRect()),event:t}:null}}class C{constructor(t,e,r){this.items=[],this.lastItemId=0,this.container=null,this.groupId=t,this.groupName=e,this.styles=r}add(t){const r=this.groupId+"-"+this.lastItemId++,n=function(t,r){let n;if(t)try{n=document.querySelector(t)}catch(t){e(t)}if(!n&&!r)return null;if(n||(n=document.body),!r){const t=document.createRange();return t.setStartBefore(n),t.setEndAfter(n),t}{const t=new P(n,r.quotedText,{prefix:r.textBefore,suffix:r.textAfter});try{return t.toRange()}catch(t){return e(t),null}}}(t.cssSelector,t.textQuote);if(e(`range ${n}`),!n)return void e("Can't locate DOM range for decoration",t);const o={id:r,decoration:t,range:n,container:null,clickableElements:null};this.items.push(o),this.layout(o)}remove(t){const e=this.items.findIndex((e=>e.decoration.id===t));if(-1===e)return;const r=this.items[e];this.items.splice(e,1),r.clickableElements=null,r.container&&(r.container.remove(),r.container=null)}relayout(){this.clearContainer();for(const t of this.items)this.layout(t)}requireContainer(){return this.container||(this.container=document.createElement("div"),this.container.id=this.groupId,this.container.dataset.group=this.groupName,this.container.style.pointerEvents="none",document.body.append(this.container)),this.container}clearContainer(){this.container&&(this.container.remove(),this.container=null)}layout(t){e(`layout ${t}`);const r=this.requireContainer(),o=this.styles.get(t.decoration.style);if(!o)return void console.log(`Unknown decoration style: ${t.decoration.style}`);const a=o,s=document.createElement("div");s.id=t.id,s.dataset.style=t.decoration.style,s.style.pointerEvents="none";const c=getComputedStyle(document.body).writingMode,u="vertical-rl"===c||"vertical-lr"===c,l=r.currentCSSZoom,f=document.scrollingElement,p=f.scrollLeft/l,y=f.scrollTop/l,h=u?window.innerHeight:window.innerWidth,d=u?window.innerWidth:window.innerHeight,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count"))||1,m=(u?d:h)/g;function b(t,e,r,n){t.style.position="absolute";const o="vertical-rl"===n;if(o||"vertical-lr"===n){if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${e.height}px`,t.style.height=`${h}px`;const r=Math.floor(e.top/h)*h;o?t.style.right=-e.right-p+"px":t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}else if("bounds"===a.width)t.style.width=`${r.height}px`,t.style.height=`${h}px`,o?t.style.right=`${-r.right-p+f.clientWidth}px`:t.style.left=`${r.left+p}px`,t.style.top=`${r.top+y}px`;else if("page"===a.width){t.style.width=`${e.height}px`,t.style.height=`${m}px`;const r=Math.floor(e.top/m)*m;o?t.style.right=`${-e.right-p+f.clientWidth}px`:t.style.left=`${e.left+p}px`,t.style.top=`${r+y}px`}}else if("wrap"===a.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+p}px`,t.style.top=`${e.top+y}px`;else if("viewport"===a.width){t.style.width=`${h}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/h)*h;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}else if("bounds"===a.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+p}px`,t.style.top=`${e.top+y}px`;else if("page"===a.width){t.style.width=`${m}px`,t.style.height=`${e.height}px`;const r=Math.floor(e.left/m)*m;t.style.left=`${r+p}px`,t.style.top=`${e.top+y}px`}}const w=(v=t.range.getBoundingClientRect(),x=l,new DOMRect(v.x/x,v.y/x,v.width/x,v.height/x));var v,x;let S;try{const e=document.createElement("template");e.innerHTML=t.decoration.element.trim(),S=e.content.firstElementChild}catch(e){let r;return r="message"in e?e.message:null,void console.log(`Invalid decoration element "${t.decoration.element}": ${r}`)}if("boxes"===a.layout){const e=!c.startsWith("vertical"),r=(E=t.range.startContainer).nodeType===Node.ELEMENT_NODE?E:E.parentElement,o=getComputedStyle(r).writingMode,a=i(t.range,e).map((t=>n(t,l))).sort(((t,e)=>t.top!==e.top?t.top-e.top:"vertical-rl"===o?e.left-t.left:t.left-e.left));for(const t of a){const e=S.cloneNode(!0);e.style.pointerEvents="none",e.dataset.writingMode=o,b(e,t,w,c),s.append(e)}}else if("bounds"===a.layout){const t=S.cloneNode(!0);t.style.pointerEvents="none",t.dataset.writingMode=c,b(t,w,w,c),s.append(t)}var E;r.append(s),t.container=s,t.clickableElements=Array.from(s.querySelectorAll("[data-activable='1']")),0===t.clickableElements.length&&(t.clickableElements=Array.from(s.children))}}class T{constructor(t,e,r){this.window=t,this.listener=e,this.decorationManager=r,document.addEventListener("click",(t=>{this.onClick(t)}),!1)}onClick(t){if(t.defaultPrevented)return;let e,r;e=t.target instanceof HTMLElement?this.nearestInteractiveElement(t.target):null,e?e instanceof HTMLAnchorElement&&(this.listener.onLinkActivated(e.href,e.outerHTML),t.stopPropagation(),t.preventDefault()):(r=this.decorationManager?this.decorationManager.handleDecorationClickEvent(t):null,r?this.listener.onDecorationActivated(r):this.listener.onTap(t))}nearestInteractiveElement(t){return null==t?null:-1!=["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t:t.parentElement?this.nearestInteractiveElement(t.parentElement):null}}var I=r(5155);r.n(I)().shim();class N{constructor(t,e){this.isSelecting=!1,document.addEventListener("selectionchange",(r=>{var n;const o=null===(n=t.getSelection())||void 0===n?void 0:n.isCollapsed;o&&this.isSelecting?(this.isSelecting=!1,e.onSelectionEnd()):o||this.isSelecting||(this.isSelecting=!0,e.onSelectionStart())}),!1)}}class ${constructor(t){this.isSelecting=!1,this.window=t}clearSelection(){var t;null===(t=this.window.getSelection())||void 0===t||t.removeAllRanges()}getCurrentSelection(){const t=this.getCurrentSelectionText();if(!t)return null;const e=this.getSelectionRect();return{selectedText:t.highlight,textBefore:t.before,textAfter:t.after,selectionRect:e}}getSelectionRect(){try{const t=this.window.getSelection().getRangeAt(0),e=this.window.document.body.currentCSSZoom;return n(o(t.getBoundingClientRect()),e)}catch(t){throw e(t),t}}getCurrentSelectionText(){const t=this.window.getSelection();if(t.isCollapsed)return;const r=t.toString();if(0===r.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const n=1===t.rangeCount?t.getRangeAt(0):function(t,r,n,o){const i=new Range;if(i.setStart(t,r),i.setEnd(n,o),!i.collapsed)return i;e(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const a=new Range;if(a.setStart(n,o),a.setEnd(t,r),!a.collapsed)return e(">>> createOrderedRange RANGE REVERSE OK."),i;e(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!n||n.collapsed)return void e("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const o=document.body.textContent,i=O.fromRange(n).relativeTo(document.body),a=i.start.offset,s=i.end.offset;let c=o.slice(Math.max(0,a-200),a);const u=c.search(/\P{L}\p{L}/gu);-1!==u&&(c=c.slice(u+1));let l=o.slice(s,Math.min(o.length,s+200));const f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:r,before:c,after:l}}}class M{constructor(t,e){this.window=t,this.manager=e}registerTemplates(t){const e=function(t){return new Map(Object.entries(JSON.parse(t)))}(t);this.manager.registerTemplates(e)}addDecoration(t,e){const r=function(t){return JSON.parse(t)}(t);this.manager.addDecoration(r,e)}removeDecoration(t,e){this.manager.removeDecoration(t,e)}}class D{constructor(t,e){this.gesturesBridge=t,this.selectionListenerBridge=e}onTap(t){const e={x:(t.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e);this.gesturesBridge.onTap(r)}onLinkActivated(t,e){this.gesturesBridge.onLinkActivated(t,e)}onDecorationActivated(t){const e={x:(t.event.clientX-visualViewport.offsetLeft)*visualViewport.scale,y:(t.event.clientY-visualViewport.offsetTop)*visualViewport.scale},r=JSON.stringify(e),n=JSON.stringify(t.rect);this.gesturesBridge.onDecorationActivated(t.id,t.group,n,r)}onSelectionStart(){this.selectionListenerBridge.onSelectionStart()}onSelectionEnd(){this.selectionListenerBridge.onSelectionEnd()}}class F{constructor(t,e){this.window=t,this.manager=e}getCurrentSelection(){return this.manager.getCurrentSelection()}clearSelection(){this.manager.clearSelection()}}class k{constructor(t){this.document=t}setProperties(t){for(const[e,r]of t)this.setProperty(e,r)}setProperty(t,e){null===e||""===e?this.removeProperty(t):document.documentElement.style.setProperty(t,e,"important")}removeProperty(t){document.documentElement.style.removeProperty(t)}}class B{constructor(t){this.document=t}getOffsetForLocation(t,e){var r,n;const o=function(t){return JSON.parse(t)}(t);return o.textAfter||o.textBefore?this.getOffsetForTextAnchor(null!==(r=o.textBefore)&&void 0!==r?r:"",null!==(n=o.textAfter)&&void 0!==n?n:"",e):o.cssSelector?this.getOffsetForCssSelector(o.cssSelector,e):o.htmlId?this.getOffsetForHtmlId(o.htmlId,e):null}getOffsetForTextAnchor(t,r,n){const o=this.document.body,i=new P(o,"",{prefix:t,suffix:r});try{const t=i.toRange();return this.getOffsetForRect(t.getBoundingClientRect(),n)}catch(t){return e(t),null}}getOffsetForCssSelector(t,r){let n;try{n=this.document.querySelector(t)}catch(t){e(t)}return n?this.getOffsetForElement(n,r):null}getOffsetForHtmlId(t,e){const r=this.document.getElementById(t);return r?this.getOffsetForElement(r,e):null}getOffsetForElement(t,e){const r=t.getBoundingClientRect();return this.getOffsetForRect(r,e)}getOffsetForRect(t,e){return e?t.top+window.scrollY:t.left+window.scrollX}}window.addEventListener("load",(t=>{let e=!1;new ResizeObserver((()=>{let t=!1;requestAnimationFrame((()=>{const r=window.document.scrollingElement,n=null==r||0==r.scrollHeight&&0==r.scrollWidth;if(e||!n){if(!t&&!n){const e=function(t){const e=function(t){return parseInt(t.getComputedStyle(t.document.documentElement).getPropertyValue("column-count"))}(t);if(!e)return!1;const r=t.document.querySelectorAll("div[id^='readium-virtual-page']"),n=r.length;for(const t of r)t.remove();const o=t.document.scrollingElement.scrollWidth,i=t.visualViewport.width,a=Math.round(o/i*e)%e,s=1===e||0===a?0:e-a;if(s>0)for(let e=0;e{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),this.window.document.head.appendChild(t)}))}}(window,window.reflowableApiState)}()}(); //# sourceMappingURL=reflowable-injectable-script.js.map \ No newline at end of file diff --git a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map index 1e0a708c84..36d82ab404 100644 --- a/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map +++ b/readium/navigators/web/internals/src/main/assets/readium/navigator/web/internals/generated/reflowable-injectable-script.js.map @@ -1 +1 @@ -{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,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B,SAAU9kB,OAAO+kB,mBACvEtH,EAAoB,IAAI9G,EAAkB3W,QAChD7S,KAAK6S,OAAOglB,WAAa,IAAInD,EAAU7hB,OAAOrK,UAC9CxI,KAAKqwB,SAASyH,oBACd93B,KAAK6S,OAAO2f,UAAY,IAAIiC,EAA0B5hB,OAAQ,IAAI+e,EAAiB/e,SACnF7S,KAAKqwB,SAAS0H,0BACd/3B,KAAK6S,OAAOmlB,YAAc,IAAI3E,EAA4BxgB,OAAQyd,GAClEtwB,KAAKqwB,SAAS4H,2BACd,IAAI7H,EAAiBvd,OAAQ6kB,EAAgBpH,GAC7C,IAAIe,EAAkBxe,OAAQ6kB,EAClC,CAEA,aAAAJ,GACIt3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMsO,EAAO1vB,SAASmiB,cAAc,QACpCuN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B/2B,KAAK6S,OAAOrK,SAAS2vB,KAAKrN,YAAYoN,EAAK,GAEnD,GFIsBrlB,OAAQA,OAAOulB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n return;\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"reflowable-injectable-script.js","mappings":"mDAmCA,SAASA,EAAQC,GACb,OAAOA,EACFC,MAAM,IACNF,UACAG,KAAK,GACd,CAwCA,SAASC,EAAaC,GAClB,OAASA,GAAKA,IAAM,GAAM,CAC9B,CAaA,SAASC,EAAaC,EAAKC,EAAKC,EAAGC,GAC/B,IAAIC,EAAKJ,EAAIK,EAAEH,GACXI,EAAKN,EAAIO,EAAEL,GACXM,EAAgBL,IAAQ,GACxBM,EAAKR,EAAIC,GAAKM,EAEdE,EAAKD,EAAKH,EACVK,GAAQF,EAAKL,GAAMA,EAAMA,EAAMK,EAC/BG,EAAKN,IAAOK,EAAKP,GACjBS,EAAKT,EAAKO,EAEVG,EAAOjB,EAAae,EAAKZ,EAAIe,YAAYb,IACzCL,EAAagB,EAAKb,EAAIe,YAAYb,IAUtC,OARAU,IAAO,EACPC,IAAO,EAGPT,GAFAS,GAAML,KAEME,GADZE,GAAMf,EAAaM,GAAOK,IAE1BF,EAAKM,EAAKF,EACVV,EAAIK,EAAEH,GAAKE,EACXJ,EAAIO,EAAEL,GAAKI,EACJQ,CACX,CASA,SAASE,EAAcC,EAAMC,EAASC,GAClC,GAAuB,IAAnBD,EAAQE,OACR,MAAO,GAIXD,EAAYE,KAAKC,IAAIH,EAAWD,EAAQE,QACxC,IAAIG,EAAU,GAEVC,EAAI,GAEJC,EAAOJ,KAAKK,KAAKR,EAAQE,OAASI,GA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BACd93B,KAAK6S,OAAO2f,UAAY,IAAIiC,EAA0B5hB,OAAQ,IAAI+e,EAAiB/e,SACnF7S,KAAKqwB,SAAS0H,0BACd/3B,KAAK6S,OAAOmlB,YAAc,IAAI3E,EAA4BxgB,OAAQyd,GAClEtwB,KAAKqwB,SAAS4H,2BACd,IAAI7H,EAAiBvd,OAAQ6kB,EAAgBpH,GAC7C,IAAIe,EAAkBxe,OAAQ6kB,EAClC,CAEA,aAAAJ,GACIt3B,KAAK6S,OAAOrK,SAASohB,iBAAiB,oBAAoB,KACtD,MAAMsO,EAAO1vB,SAASmiB,cAAc,QACpCuN,EAAKnB,aAAa,OAAQ,YAC1BmB,EAAKnB,aAAa,UAAW,gGAC7B/2B,KAAK6S,OAAOrK,SAAS2vB,KAAKrN,YAAYoN,EAAK,GAEnD,GFIsBrlB,OAAQA,OAAOulB,mB","sources":["webpack://readium-js/./node_modules/.pnpm/approx-string-match@1.1.0/node_modules/approx-string-match/dist/index.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js","webpack://readium-js/./node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js","webpack://readium-js/./node_modules/.pnpm/define-data-property@1.1.0/node_modules/define-data-property/index.js","webpack://readium-js/./node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js","webpack://readium-js/./node_modules/.pnpm/es-set-tostringtag@2.0.1/node_modules/es-set-tostringtag/index.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js","webpack://readium-js/./node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js","webpack://readium-js/./node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js","webpack://readium-js/./node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js","webpack://readium-js/./node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js","webpack://readium-js/./node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js","webpack://readium-js/./node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js","webpack://readium-js/./node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js","webpack://readium-js/./node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js","webpack://readium-js/./node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js","webpack://readium-js/./node_modules/.pnpm/has@1.0.4/node_modules/has/src/index.js","webpack://readium-js/./node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js","webpack://readium-js/./node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js","webpack://readium-js/./node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js","webpack://readium-js/./node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js","webpack://readium-js/./node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js","webpack://readium-js/./node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js","webpack://readium-js/./node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/implementation.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/index.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/polyfill.js","webpack://readium-js/./node_modules/.pnpm/regexp.prototype.flags@1.5.1/node_modules/regexp.prototype.flags/shim.js","webpack://readium-js/./node_modules/.pnpm/safe-regex-test@1.0.0/node_modules/safe-regex-test/index.js","webpack://readium-js/./node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js","webpack://readium-js/./node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill-regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/regexp-matchall.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.matchall@4.0.10/node_modules/string.prototype.matchall/shim.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/implementation.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/index.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/polyfill.js","webpack://readium-js/./node_modules/.pnpm/string.prototype.trim@1.2.8/node_modules/string.prototype.trim/shim.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/AdvanceStringIndex.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Call.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CodePointAt.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateIterResultObject.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateMethodProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/CreateRegExpStringIterator.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/DefinePropertyOrThrow.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/FromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Get.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetMethod.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/GetV.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsAccessorDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsCallable.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsDataDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsPropertyKey.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/IsRegExp.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/OrdinaryObjectCreate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RegExpExec.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/RequireObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SameValue.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Set.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/SpeciesConstructor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/StringToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToBoolean.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToIntegerOrInfinity.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToLength.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToNumber.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/ToString.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/UTF16SurrogatePairToCodePoint.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/floor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/2023/truncate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/CheckObjectCoercible.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/5/Type.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/GetIntrinsic.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/DefineOwnProperty.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/IsArray.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/assertRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/forEach.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isFinite.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isInteger.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isLeadingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isMatchRecord.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isNaN.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPrimitive.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isPropertyDescriptor.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/isTrailingSurrogate.js","webpack://readium-js/./node_modules/.pnpm/es-abstract@1.22.2/node_modules/es-abstract/helpers/maxSafeInteger.js","webpack://readium-js/webpack/bootstrap","webpack://readium-js/webpack/runtime/compat get default export","webpack://readium-js/webpack/runtime/define property getters","webpack://readium-js/webpack/runtime/hasOwnProperty shorthand","webpack://readium-js/./src/util/log.ts","webpack://readium-js/./src/util/rect.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/trim-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/text-range.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/match-quote.ts","webpack://readium-js/./src/vendor/hypothesis/annotator/anchoring/types.ts","webpack://readium-js/./src/common/decoration.ts","webpack://readium-js/./src/common/gestures.ts","webpack://readium-js/./src/common/selection.ts","webpack://readium-js/./src/bridge/all-decoration-bridge.ts","webpack://readium-js/./src/bridge/all-listener-bridge.ts","webpack://readium-js/./src/bridge/all-selection-bridge.ts","webpack://readium-js/./src/bridge/reflowable-css-bridge.ts","webpack://readium-js/./src/bridge/reflowable-move-bridge.ts","webpack://readium-js/./src/index-reflowable-injectable.ts","webpack://readium-js/./src/util/columns.ts","webpack://readium-js/./src/bridge/reflowable-initialization-bridge.ts"],"sourcesContent":["\"use strict\";\n/**\n * Implementation of Myers' online approximate string matching algorithm [1],\n * with additional optimizations suggested by [2].\n *\n * This has O((k/w) * n) complexity where `n` is the length of the text, `k` is\n * the maximum number of errors allowed (always <= the pattern length) and `w`\n * is the word size. Because JS only supports bitwise operations on 32 bit\n * integers, `w` is 32.\n *\n * As far as I am aware, there aren't any online algorithms which are\n * significantly better for a wide range of input parameters. The problem can be\n * solved faster using \"filter then verify\" approaches which first filter out\n * regions of the text that cannot match using a \"cheap\" check and then verify\n * the remaining potential matches. The verify step requires an algorithm such\n * as this one however.\n *\n * The algorithm's approach is essentially to optimize the classic dynamic\n * programming solution to the problem by computing columns of the matrix in\n * word-sized chunks (ie. dealing with 32 chars of the pattern at a time) and\n * avoiding calculating regions of the matrix where the minimum error count is\n * guaranteed to exceed the input threshold.\n *\n * The paper consists of two parts, the first describes the core algorithm for\n * matching patterns <= the size of a word (implemented by `advanceBlock` here).\n * The second uses the core algorithm as part of a larger block-based algorithm\n * to handle longer patterns.\n *\n * [1] G. Myers, “A Fast Bit-Vector Algorithm for Approximate String Matching\n * Based on Dynamic Programming,” vol. 46, no. 3, pp. 395–415, 1999.\n *\n * [2] Šošić, M. (2014). An simd dynamic programming c/c++ library (Doctoral\n * dissertation, Fakultet Elektrotehnike i računarstva, Sveučilište u Zagrebu).\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction reverse(s) {\n return s\n .split(\"\")\n .reverse()\n .join(\"\");\n}\n/**\n * Given the ends of approximate matches for `pattern` in `text`, find\n * the start of the matches.\n *\n * @param findEndFn - Function for finding the end of matches in\n * text.\n * @return Matches with the `start` property set.\n */\nfunction findMatchStarts(text, pattern, matches) {\n var patRev = reverse(pattern);\n return matches.map(function (m) {\n // Find start of each match by reversing the pattern and matching segment\n // of text and searching for an approx match with the same number of\n // errors.\n var minStart = Math.max(0, m.end - pattern.length - m.errors);\n var textRev = reverse(text.slice(minStart, m.end));\n // If there are multiple possible start points, choose the one that\n // maximizes the length of the match.\n var start = findMatchEnds(textRev, patRev, m.errors).reduce(function (min, rm) {\n if (m.end - rm.end < min) {\n return m.end - rm.end;\n }\n return min;\n }, m.end);\n return {\n start: start,\n end: m.end,\n errors: m.errors\n };\n });\n}\n/**\n * Return 1 if a number is non-zero or zero otherwise, without using\n * conditional operators.\n *\n * This should get inlined into `advanceBlock` below by the JIT.\n *\n * Adapted from https://stackoverflow.com/a/3912218/434243\n */\nfunction oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}\n/**\n * Block calculation step of the algorithm.\n *\n * From Fig 8. on p. 408 of [1], additionally optimized to replace conditional\n * checks with bitwise operations as per Section 4.2.3 of [2].\n *\n * @param ctx - The pattern context object\n * @param peq - The `peq` array for the current character (`ctx.peq.get(ch)`)\n * @param b - The block level\n * @param hIn - Horizontal input delta ∈ {1,0,-1}\n * @return Horizontal output delta ∈ {1,0,-1}\n */\nfunction advanceBlock(ctx, peq, b, hIn) {\n var pV = ctx.P[b];\n var mV = ctx.M[b];\n var hInIsNegative = hIn >>> 31; // 1 if hIn < 0 or 0 otherwise.\n var eq = peq[b] | hInIsNegative;\n // Step 1: Compute horizontal deltas.\n var xV = eq | mV;\n var xH = (((eq & pV) + pV) ^ pV) | eq;\n var pH = mV | ~(xH | pV);\n var mH = pV & xH;\n // Step 2: Update score (value of last row of this block).\n var hOut = oneIfNotZero(pH & ctx.lastRowMask[b]) -\n oneIfNotZero(mH & ctx.lastRowMask[b]);\n // Step 3: Update vertical deltas for use when processing next char.\n pH <<= 1;\n mH <<= 1;\n mH |= hInIsNegative;\n pH |= oneIfNotZero(hIn) - hInIsNegative; // set pH[0] if hIn > 0\n pV = mH | ~(xV | pH);\n mV = pH & xV;\n ctx.P[b] = pV;\n ctx.M[b] = mV;\n return hOut;\n}\n/**\n * Find the ends and error counts for matches of `pattern` in `text`.\n *\n * Only the matches with the lowest error count are reported. Other matches\n * with error counts <= maxErrors are discarded.\n *\n * This is the block-based search algorithm from Fig. 9 on p.410 of [1].\n */\nfunction findMatchEnds(text, pattern, maxErrors) {\n if (pattern.length === 0) {\n return [];\n }\n // Clamp error count so we can rely on the `maxErrors` and `pattern.length`\n // rows being in the same block below.\n maxErrors = Math.min(maxErrors, pattern.length);\n var matches = [];\n // Word size.\n var w = 32;\n // Index of maximum block level.\n var bMax = Math.ceil(pattern.length / w) - 1;\n // Context used across block calculations.\n var ctx = {\n P: new Uint32Array(bMax + 1),\n M: new Uint32Array(bMax + 1),\n lastRowMask: new Uint32Array(bMax + 1)\n };\n ctx.lastRowMask.fill(1 << 31);\n ctx.lastRowMask[bMax] = 1 << (pattern.length - 1) % w;\n // Dummy \"peq\" array for chars in the text which do not occur in the pattern.\n var emptyPeq = new Uint32Array(bMax + 1);\n // Map of UTF-16 character code to bit vector indicating positions in the\n // pattern that equal that character.\n var peq = new Map();\n // Version of `peq` that only stores mappings for small characters. This\n // allows faster lookups when iterating through the text because a simple\n // array lookup can be done instead of a hash table lookup.\n var asciiPeq = [];\n for (var i = 0; i < 256; i++) {\n asciiPeq.push(emptyPeq);\n }\n // Calculate `ctx.peq` - a map of character values to bitmasks indicating\n // positions of that character within the pattern, where each bit represents\n // a position in the pattern.\n for (var c = 0; c < pattern.length; c += 1) {\n var val = pattern.charCodeAt(c);\n if (peq.has(val)) {\n // Duplicate char in pattern.\n continue;\n }\n var charPeq = new Uint32Array(bMax + 1);\n peq.set(val, charPeq);\n if (val < asciiPeq.length) {\n asciiPeq[val] = charPeq;\n }\n for (var b = 0; b <= bMax; b += 1) {\n charPeq[b] = 0;\n // Set all the bits where the pattern matches the current char (ch).\n // For indexes beyond the end of the pattern, always set the bit as if the\n // pattern contained a wildcard char in that position.\n for (var r = 0; r < w; r += 1) {\n var idx = b * w + r;\n if (idx >= pattern.length) {\n continue;\n }\n var match = pattern.charCodeAt(idx) === val;\n if (match) {\n charPeq[b] |= 1 << r;\n }\n }\n }\n }\n // Index of last-active block level in the column.\n var y = Math.max(0, Math.ceil(maxErrors / w) - 1);\n // Initialize maximum error count at bottom of each block.\n var score = new Uint32Array(bMax + 1);\n for (var b = 0; b <= y; b += 1) {\n score[b] = (b + 1) * w;\n }\n score[bMax] = pattern.length;\n // Initialize vertical deltas for each block.\n for (var b = 0; b <= y; b += 1) {\n ctx.P[b] = ~0;\n ctx.M[b] = 0;\n }\n // Process each char of the text, computing the error count for `w` chars of\n // the pattern at a time.\n for (var j = 0; j < text.length; j += 1) {\n // Lookup the bitmask representing the positions of the current char from\n // the text within the pattern.\n var charCode = text.charCodeAt(j);\n var charPeq = void 0;\n if (charCode < asciiPeq.length) {\n // Fast array lookup.\n charPeq = asciiPeq[charCode];\n }\n else {\n // Slower hash table lookup.\n charPeq = peq.get(charCode);\n if (typeof charPeq === \"undefined\") {\n charPeq = emptyPeq;\n }\n }\n // Calculate error count for blocks that we definitely have to process for\n // this column.\n var carry = 0;\n for (var b = 0; b <= y; b += 1) {\n carry = advanceBlock(ctx, charPeq, b, carry);\n score[b] += carry;\n }\n // Check if we also need to compute an additional block, or if we can reduce\n // the number of blocks processed for the next column.\n if (score[y] - carry <= maxErrors &&\n y < bMax &&\n (charPeq[y + 1] & 1 || carry < 0)) {\n // Error count for bottom block is under threshold, increase the number of\n // blocks processed for this column & next by 1.\n y += 1;\n ctx.P[y] = ~0;\n ctx.M[y] = 0;\n var maxBlockScore = y === bMax ? pattern.length % w : w;\n score[y] =\n score[y - 1] +\n maxBlockScore -\n carry +\n advanceBlock(ctx, charPeq, y, carry);\n }\n else {\n // Error count for bottom block exceeds threshold, reduce the number of\n // blocks processed for the next column.\n while (y > 0 && score[y] >= maxErrors + w) {\n y -= 1;\n }\n }\n // If error count is under threshold, report a match.\n if (y === bMax && score[y] <= maxErrors) {\n if (score[y] < maxErrors) {\n // Discard any earlier, worse matches.\n matches.splice(0, matches.length);\n }\n matches.push({\n start: -1,\n end: j + 1,\n errors: score[y]\n });\n // Because `search` only reports the matches with the lowest error count,\n // we can \"ratchet down\" the max error threshold whenever a match is\n // encountered and thereby save a small amount of work for the remainder\n // of the text.\n maxErrors = score[y];\n }\n }\n return matches;\n}\n/**\n * Search for matches for `pattern` in `text` allowing up to `maxErrors` errors.\n *\n * Returns the start, and end positions and error counts for each lowest-cost\n * match. Only the \"best\" matches are returned.\n */\nfunction search(text, pattern, maxErrors) {\n var matches = findMatchEnds(text, pattern, maxErrors);\n return findMatchStarts(text, pattern, matches);\n}\nexports.default = search;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);\n\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar gopd = require('gopd');\n\n/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has = require('has');\n\nvar toStringTag = hasToStringTag ? Symbol.toStringTag : null;\n\nmodule.exports = function setToStringTag(object, value) {\n\tvar overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;\n\tif (toStringTag && (overrideIfSet || !has(object, toStringTag))) {\n\t\tif ($defineProperty) {\n\t\t\t$defineProperty(object, toStringTag, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: value,\n\t\t\t\twritable: false\n\t\t\t});\n\t\t} else {\n\t\t\tobject[toStringTag] = value; // eslint-disable-line no-param-reassign\n\t\t}\n\t}\n};\n","'use strict';\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar isPrimitive = require('./helpers/isPrimitive');\nvar isCallable = require('is-callable');\nvar isDate = require('is-date-object');\nvar isSymbol = require('is-symbol');\n\nvar ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {\n\tif (typeof O === 'undefined' || O === null) {\n\t\tthrow new TypeError('Cannot call method on ' + O);\n\t}\n\tif (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {\n\t\tthrow new TypeError('hint must be \"string\" or \"number\"');\n\t}\n\tvar methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\tvar method, result, i;\n\tfor (i = 0; i < methodNames.length; ++i) {\n\t\tmethod = O[methodNames[i]];\n\t\tif (isCallable(method)) {\n\t\t\tresult = method.call(O);\n\t\t\tif (isPrimitive(result)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError('No default value');\n};\n\nvar GetMethod = function GetMethod(O, P) {\n\tvar func = O[P];\n\tif (func !== null && typeof func !== 'undefined') {\n\t\tif (!isCallable(func)) {\n\t\t\tthrow new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');\n\t\t}\n\t\treturn func;\n\t}\n\treturn void 0;\n};\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tvar hint = 'default';\n\tif (arguments.length > 1) {\n\t\tif (arguments[1] === String) {\n\t\t\thint = 'string';\n\t\t} else if (arguments[1] === Number) {\n\t\t\thint = 'number';\n\t\t}\n\t}\n\n\tvar exoticToPrim;\n\tif (hasSymbols) {\n\t\tif (Symbol.toPrimitive) {\n\t\t\texoticToPrim = GetMethod(input, Symbol.toPrimitive);\n\t\t} else if (isSymbol(input)) {\n\t\t\texoticToPrim = Symbol.prototype.valueOf;\n\t\t}\n\t}\n\tif (typeof exoticToPrim !== 'undefined') {\n\t\tvar result = exoticToPrim.call(input, hint);\n\t\tif (isPrimitive(result)) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new TypeError('unable to convert exotic object to primitive');\n\t}\n\tif (hint === 'default' && (isDate(input) || isSymbol(input))) {\n\t\thint = 'string';\n\t}\n\treturn ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar functionsHaveNames = function functionsHaveNames() {\n\treturn typeof function f() {}.name === 'string';\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nif (gOPD) {\n\ttry {\n\t\tgOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\tgOPD = null;\n\t}\n}\n\nfunctionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {\n\tif (!functionsHaveNames() || !gOPD) {\n\t\treturn false;\n\t}\n\tvar desc = gOPD(function () {}, 'name');\n\treturn !!desc && !!desc.configurable;\n};\n\nvar $bind = Function.prototype.bind;\n\nfunctionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {\n\treturn functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';\n};\n\nmodule.exports = functionsHaveNames;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(hasOwnProperty) : function (O, P) {\n return call.call(hasOwnProperty, O, P);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar has = require('has');\nvar channel = require('side-channel')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar SLOT = {\n\tassert: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tchannel.assert(O);\n\t\tif (!SLOT.has(O, slot)) {\n\t\t\tthrow new $TypeError('`' + slot + '` is not present on `O`');\n\t\t}\n\t},\n\tget: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn slots && slots['$' + slot];\n\t},\n\thas: function (O, slot) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\treturn !!slots && has(slots, '$' + slot);\n\t},\n\tset: function (O, slot, V) {\n\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\tthrow new $TypeError('`O` is not an object');\n\t\t}\n\t\tif (typeof slot !== 'string') {\n\t\t\tthrow new $TypeError('`slot` must be a string');\n\t\t}\n\t\tvar slots = channel.get(O);\n\t\tif (!slots) {\n\t\t\tslots = {};\n\t\t\tchannel.set(O, slots);\n\t\t}\n\t\tslots['$' + slot] = V;\n\t}\n};\n\nif (Object.freeze) {\n\tObject.freeze(SLOT);\n}\n\nmodule.exports = SLOT;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line consistent-return\n\t? function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar descriptor = gOPD(value, 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$exec(value, badStringifier);\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t}\n\t: function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar hasSymbols = require('has-symbols')();\n\nif (hasSymbols) {\n\tvar symToStr = Symbol.prototype.toString;\n\tvar symStringRegex = /^Symbol\\(.*\\)$/;\n\tvar isSymbolObject = function isRealSymbolObject(value) {\n\t\tif (typeof value.valueOf() !== 'symbol') {\n\t\t\treturn false;\n\t\t}\n\t\treturn symStringRegex.test(symToStr.call(value));\n\t};\n\n\tmodule.exports = function isSymbol(value) {\n\t\tif (typeof value === 'symbol') {\n\t\t\treturn true;\n\t\t}\n\t\tif (toStr.call(value) !== '[object Symbol]') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\treturn isSymbolObject(value);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n} else {\n\n\tmodule.exports = function isSymbol(value) {\n\t\t// this environment does not support Symbols.\n\t\treturn false && value;\n\t};\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar setFunctionName = require('set-function-name');\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = setFunctionName(function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.hasIndices) {\n\t\tresult += 'd';\n\t}\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.unicodeSets) {\n\t\tresult += 'v';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n}, 'get flags', true);\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(getPolyfill());\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function getPolyfill() {\n\tif (supportsDescriptors && (/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (\n\t\t\tdescriptor\n\t\t\t&& typeof descriptor.get === 'function'\n\t\t\t&& typeof RegExp.prototype.dotAll === 'boolean'\n\t\t\t&& typeof RegExp.prototype.hasIndices === 'boolean'\n\t\t) {\n\t\t\t/* eslint getter-return: 0 */\n\t\t\tvar calls = '';\n\t\t\tvar o = {};\n\t\t\tObject.defineProperty(o, 'hasIndices', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'd';\n\t\t\t\t}\n\t\t\t});\n\t\t\tObject.defineProperty(o, 'sticky', {\n\t\t\t\tget: function () {\n\t\t\t\t\tcalls += 'y';\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (calls === 'dy') {\n\t\t\t\treturn descriptor.get;\n\t\t\t}\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar GetIntrinsic = require('get-intrinsic');\nvar isRegex = require('is-regex');\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n","'use strict';\n\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();\n\nvar $TypeError = TypeError;\n\nmodule.exports = function setFunctionName(fn, name) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\tif (!loose || functionsHaveConfigurableNames) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(fn, 'name', name, true, true);\n\t\t} else {\n\t\t\tdefine(fn, 'name', name);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar Call = require('es-abstract/2023/Call');\nvar Get = require('es-abstract/2023/Get');\nvar GetMethod = require('es-abstract/2023/GetMethod');\nvar IsRegExp = require('es-abstract/2023/IsRegExp');\nvar ToString = require('es-abstract/2023/ToString');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar callBound = require('call-bind/callBound');\nvar hasSymbols = require('has-symbols')();\nvar flagsGetter = require('regexp.prototype.flags');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar getMatcher = function getMatcher(regexp) { // eslint-disable-line consistent-return\n\tvar matcherPolyfill = regexpMatchAllPolyfill();\n\tif (hasSymbols && typeof Symbol.matchAll === 'symbol') {\n\t\tvar matcher = GetMethod(regexp, Symbol.matchAll);\n\t\tif (matcher === RegExp.prototype[Symbol.matchAll] && matcher !== matcherPolyfill) {\n\t\t\treturn matcherPolyfill;\n\t\t}\n\t\treturn matcher;\n\t}\n\t// fallback for pre-Symbol.matchAll environments\n\tif (IsRegExp(regexp)) {\n\t\treturn matcherPolyfill;\n\t}\n};\n\nmodule.exports = function matchAll(regexp) {\n\tvar O = RequireObjectCoercible(this);\n\n\tif (typeof regexp !== 'undefined' && regexp !== null) {\n\t\tvar isRegExp = IsRegExp(regexp);\n\t\tif (isRegExp) {\n\t\t\t// workaround for older engines that lack RegExp.prototype.flags\n\t\t\tvar flags = 'flags' in regexp ? Get(regexp, 'flags') : flagsGetter(regexp);\n\t\t\tRequireObjectCoercible(flags);\n\t\t\tif ($indexOf(ToString(flags), 'g') < 0) {\n\t\t\t\tthrow new TypeError('matchAll requires a global regular expression');\n\t\t\t}\n\t\t}\n\n\t\tvar matcher = getMatcher(regexp);\n\t\tif (typeof matcher !== 'undefined') {\n\t\t\treturn Call(matcher, regexp, [O]);\n\t\t}\n\t}\n\n\tvar S = ToString(O);\n\t// var rx = RegExpCreate(regexp, 'g');\n\tvar rx = new RegExp(regexp, 'g');\n\treturn Call(getMatcher(rx), rx, [S]);\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar boundMatchAll = callBind(implementation);\n\ndefine(boundMatchAll, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMatchAll;\n","'use strict';\n\nvar hasSymbols = require('has-symbols')();\nvar regexpMatchAll = require('./regexp-matchall');\n\nmodule.exports = function getRegExpMatchAllPolyfill() {\n\tif (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {\n\t\treturn regexpMatchAll;\n\t}\n\treturn RegExp.prototype[Symbol.matchAll];\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.matchAll) {\n\t\ttry {\n\t\t\t''.matchAll(RegExp.prototype);\n\t\t} catch (e) {\n\t\t\treturn String.prototype.matchAll;\n\t\t}\n\t}\n\treturn implementation;\n};\n","'use strict';\n\n// var Construct = require('es-abstract/2023/Construct');\nvar CreateRegExpStringIterator = require('es-abstract/2023/CreateRegExpStringIterator');\nvar Get = require('es-abstract/2023/Get');\nvar Set = require('es-abstract/2023/Set');\nvar SpeciesConstructor = require('es-abstract/2023/SpeciesConstructor');\nvar ToLength = require('es-abstract/2023/ToLength');\nvar ToString = require('es-abstract/2023/ToString');\nvar Type = require('es-abstract/2023/Type');\nvar flagsGetter = require('regexp.prototype.flags');\nvar setFunctionName = require('set-function-name');\nvar callBound = require('call-bind/callBound');\n\nvar $indexOf = callBound('String.prototype.indexOf');\n\nvar OrigRegExp = RegExp;\n\nvar supportsConstructingWithFlags = 'flags' in RegExp.prototype;\n\nvar constructRegexWithFlags = function constructRegex(C, R) {\n\tvar matcher;\n\t// workaround for older engines that lack RegExp.prototype.flags\n\tvar flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));\n\tif (supportsConstructingWithFlags && typeof flags === 'string') {\n\t\tmatcher = new C(R, flags);\n\t} else if (C === OrigRegExp) {\n\t\t// workaround for older engines that can not construct a RegExp with flags\n\t\tmatcher = new C(R.source, flags);\n\t} else {\n\t\tmatcher = new C(R, flags);\n\t}\n\treturn { flags: flags, matcher: matcher };\n};\n\nvar regexMatchAll = setFunctionName(function SymbolMatchAll(string) {\n\tvar R = this;\n\tif (Type(R) !== 'Object') {\n\t\tthrow new TypeError('\"this\" value must be an Object');\n\t}\n\tvar S = ToString(string);\n\tvar C = SpeciesConstructor(R, OrigRegExp);\n\n\tvar tmp = constructRegexWithFlags(C, R);\n\t// var flags = ToString(Get(R, 'flags'));\n\tvar flags = tmp.flags;\n\t// var matcher = Construct(C, [R, flags]);\n\tvar matcher = tmp.matcher;\n\n\tvar lastIndex = ToLength(Get(R, 'lastIndex'));\n\tSet(matcher, 'lastIndex', lastIndex, true);\n\tvar global = $indexOf(flags, 'g') > -1;\n\tvar fullUnicode = $indexOf(flags, 'u') > -1;\n\treturn CreateRegExpStringIterator(matcher, S, global, fullUnicode);\n}, '[Symbol.matchAll]', true);\n\nmodule.exports = regexMatchAll;\n","'use strict';\n\nvar define = require('define-properties');\nvar hasSymbols = require('has-symbols')();\nvar getPolyfill = require('./polyfill');\nvar regexpMatchAllPolyfill = require('./polyfill-regexp-matchall');\n\nvar defineP = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nmodule.exports = function shimMatchAll() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tString.prototype,\n\t\t{ matchAll: polyfill },\n\t\t{ matchAll: function () { return String.prototype.matchAll !== polyfill; } }\n\t);\n\tif (hasSymbols) {\n\t\t// eslint-disable-next-line no-restricted-properties\n\t\tvar symbol = Symbol.matchAll || (Symbol['for'] ? Symbol['for']('Symbol.matchAll') : Symbol('Symbol.matchAll'));\n\t\tdefine(\n\t\t\tSymbol,\n\t\t\t{ matchAll: symbol },\n\t\t\t{ matchAll: function () { return Symbol.matchAll !== symbol; } }\n\t\t);\n\n\t\tif (defineP && gOPD) {\n\t\t\tvar desc = gOPD(Symbol, symbol);\n\t\t\tif (!desc || desc.configurable) {\n\t\t\t\tdefineP(Symbol, symbol, {\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tvalue: symbol,\n\t\t\t\t\twritable: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar regexpMatchAll = regexpMatchAllPolyfill();\n\t\tvar func = {};\n\t\tfunc[symbol] = regexpMatchAll;\n\t\tvar predicate = {};\n\t\tpredicate[symbol] = function () {\n\t\t\treturn RegExp.prototype[symbol] !== regexpMatchAll;\n\t\t};\n\t\tdefine(RegExp.prototype, func, predicate);\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\nvar ToString = require('es-abstract/2023/ToString');\nvar callBound = require('call-bind/callBound');\nvar $replace = callBound('String.prototype.replace');\n\nvar mvsIsWS = (/^\\s$/).test('\\u180E');\n/* eslint-disable no-control-regex */\nvar leftWhitespace = mvsIsWS\n\t? /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/\n\t: /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = mvsIsWS\n\t? /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/\n\t: /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ToString(RequireObjectCoercible(this));\n\treturn $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\nvar RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar bound = callBind(getPolyfill());\nvar boundMethod = function trim(receiver) {\n\tRequireObjectCoercible(receiver);\n\treturn bound(receiver);\n};\n\ndefine(boundMethod, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundMethod;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\nvar mongolianVowelSeparator = '\\u180E';\n\nmodule.exports = function getPolyfill() {\n\tif (\n\t\tString.prototype.trim\n\t\t&& zeroWidthSpace.trim() === zeroWidthSpace\n\t\t&& mongolianVowelSeparator.trim() === mongolianVowelSeparator\n\t\t&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)\n\t\t&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')\n\t) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar CodePointAt = require('./CodePointAt');\nvar Type = require('./Type');\n\nvar isInteger = require('../helpers/isInteger');\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/12.0/#sec-advancestringindex\n\nmodule.exports = function AdvanceStringIndex(S, index, unicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tif (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {\n\t\tthrow new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');\n\t}\n\tif (Type(unicode) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `unicode` must be a Boolean');\n\t}\n\tif (!unicode) {\n\t\treturn index + 1;\n\t}\n\tvar length = S.length;\n\tif ((index + 1) >= length) {\n\t\treturn index + 1;\n\t}\n\tvar cp = CodePointAt(S, index);\n\treturn index + cp['[[CodeUnitCount]]'];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsArray = require('./IsArray');\n\nvar $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');\n\n// https://262.ecma-international.org/6.0/#sec-call\n\nmodule.exports = function Call(F, V) {\n\tvar argumentsList = arguments.length > 2 ? arguments[2] : [];\n\tif (!IsArray(argumentsList)) {\n\t\tthrow new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');\n\t}\n\treturn $apply(F, V, argumentsList);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar callBound = require('call-bind/callBound');\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\nvar Type = require('./Type');\nvar UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $charCodeAt = callBound('String.prototype.charCodeAt');\n\n// https://262.ecma-international.org/12.0/#sec-codepointat\n\nmodule.exports = function CodePointAt(string, position) {\n\tif (Type(string) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `string` must be a String');\n\t}\n\tvar size = string.length;\n\tif (position < 0 || position >= size) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');\n\t}\n\tvar first = $charCodeAt(string, position);\n\tvar cp = $charAt(string, position);\n\tvar firstIsLeading = isLeadingSurrogate(first);\n\tvar firstIsTrailing = isTrailingSurrogate(first);\n\tif (!firstIsLeading && !firstIsTrailing) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': false\n\t\t};\n\t}\n\tif (firstIsTrailing || (position + 1 === size)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\tvar second = $charCodeAt(string, position + 1);\n\tif (!isTrailingSurrogate(second)) {\n\t\treturn {\n\t\t\t'[[CodePoint]]': cp,\n\t\t\t'[[CodeUnitCount]]': 1,\n\t\t\t'[[IsUnpairedSurrogate]]': true\n\t\t};\n\t}\n\n\treturn {\n\t\t'[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),\n\t\t'[[CodeUnitCount]]': 2,\n\t\t'[[IsUnpairedSurrogate]]': false\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createiterresultobject\n\nmodule.exports = function CreateIterResultObject(value, done) {\n\tif (Type(done) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: Type(done) is not Boolean');\n\t}\n\treturn {\n\t\tvalue: value,\n\t\tdone: done\n\t};\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-createmethodproperty\n\nmodule.exports = function CreateMethodProperty(O, P, V) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar newDesc = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': false,\n\t\t'[[Value]]': V,\n\t\t'[[Writable]]': true\n\t};\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tnewDesc\n\t);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar hasSymbols = require('has-symbols')();\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);\n\nvar AdvanceStringIndex = require('./AdvanceStringIndex');\nvar CreateIterResultObject = require('./CreateIterResultObject');\nvar CreateMethodProperty = require('./CreateMethodProperty');\nvar Get = require('./Get');\nvar OrdinaryObjectCreate = require('./OrdinaryObjectCreate');\nvar RegExpExec = require('./RegExpExec');\nvar Set = require('./Set');\nvar ToLength = require('./ToLength');\nvar ToString = require('./ToString');\nvar Type = require('./Type');\n\nvar SLOT = require('internal-slot');\nvar setToStringTag = require('es-set-tostringtag');\n\nvar RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('`S` must be a string');\n\t}\n\tif (Type(global) !== 'Boolean') {\n\t\tthrow new $TypeError('`global` must be a boolean');\n\t}\n\tif (Type(fullUnicode) !== 'Boolean') {\n\t\tthrow new $TypeError('`fullUnicode` must be a boolean');\n\t}\n\tSLOT.set(this, '[[IteratingRegExp]]', R);\n\tSLOT.set(this, '[[IteratedString]]', S);\n\tSLOT.set(this, '[[Global]]', global);\n\tSLOT.set(this, '[[Unicode]]', fullUnicode);\n\tSLOT.set(this, '[[Done]]', false);\n};\n\nif (IteratorPrototype) {\n\tRegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);\n}\n\nvar RegExpStringIteratorNext = function next() {\n\tvar O = this; // eslint-disable-line no-invalid-this\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('receiver must be an object');\n\t}\n\tif (\n\t\t!(O instanceof RegExpStringIterator)\n\t\t|| !SLOT.has(O, '[[IteratingRegExp]]')\n\t\t|| !SLOT.has(O, '[[IteratedString]]')\n\t\t|| !SLOT.has(O, '[[Global]]')\n\t\t|| !SLOT.has(O, '[[Unicode]]')\n\t\t|| !SLOT.has(O, '[[Done]]')\n\t) {\n\t\tthrow new $TypeError('\"this\" value must be a RegExpStringIterator instance');\n\t}\n\tif (SLOT.get(O, '[[Done]]')) {\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tvar R = SLOT.get(O, '[[IteratingRegExp]]');\n\tvar S = SLOT.get(O, '[[IteratedString]]');\n\tvar global = SLOT.get(O, '[[Global]]');\n\tvar fullUnicode = SLOT.get(O, '[[Unicode]]');\n\tvar match = RegExpExec(R, S);\n\tif (match === null) {\n\t\tSLOT.set(O, '[[Done]]', true);\n\t\treturn CreateIterResultObject(undefined, true);\n\t}\n\tif (global) {\n\t\tvar matchStr = ToString(Get(match, '0'));\n\t\tif (matchStr === '') {\n\t\t\tvar thisIndex = ToLength(Get(R, 'lastIndex'));\n\t\t\tvar nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);\n\t\t\tSet(R, 'lastIndex', nextIndex, true);\n\t\t}\n\t\treturn CreateIterResultObject(match, false);\n\t}\n\tSLOT.set(O, '[[Done]]', true);\n\treturn CreateIterResultObject(match, false);\n};\nCreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext);\n\nif (hasSymbols) {\n\tsetToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');\n\n\tif (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {\n\t\tvar iteratorFn = function SymbolIterator() {\n\t\t\treturn this;\n\t\t};\n\t\tCreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn);\n\t}\n}\n\n// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator\nmodule.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {\n\t// assert R.global === global && R.unicode === fullUnicode?\n\treturn new RegExpStringIterator(R, S, global, fullUnicode);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar isPropertyDescriptor = require('../helpers/isPropertyDescriptor');\nvar DefineOwnProperty = require('../helpers/DefineOwnProperty');\n\nvar FromPropertyDescriptor = require('./FromPropertyDescriptor');\nvar IsAccessorDescriptor = require('./IsAccessorDescriptor');\nvar IsDataDescriptor = require('./IsDataDescriptor');\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar ToPropertyDescriptor = require('./ToPropertyDescriptor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow\n\nmodule.exports = function DefinePropertyOrThrow(O, P, desc) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\tvar Desc = isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, desc) ? desc : ToPropertyDescriptor(desc);\n\tif (!isPropertyDescriptor({\n\t\tType: Type,\n\t\tIsDataDescriptor: IsDataDescriptor,\n\t\tIsAccessorDescriptor: IsAccessorDescriptor\n\t}, Desc)) {\n\t\tthrow new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');\n\t}\n\n\treturn DefineOwnProperty(\n\t\tIsDataDescriptor,\n\t\tSameValue,\n\t\tFromPropertyDescriptor,\n\t\tO,\n\t\tP,\n\t\tDesc\n\t);\n};\n","'use strict';\n\nvar assertRecord = require('../helpers/assertRecord');\nvar fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor\n\nmodule.exports = function FromPropertyDescriptor(Desc) {\n\tif (typeof Desc !== 'undefined') {\n\t\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\t}\n\n\treturn fromPropertyDescriptor(Desc);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-get-o-p\n\nmodule.exports = function Get(O, P) {\n\t// 7.3.1.1\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\t// 7.3.1.2\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\t// 7.3.1.3\n\treturn O[P];\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar GetV = require('./GetV');\nvar IsCallable = require('./IsCallable');\nvar IsPropertyKey = require('./IsPropertyKey');\n\nvar inspect = require('object-inspect');\n\n// https://262.ecma-international.org/6.0/#sec-getmethod\n\nmodule.exports = function GetMethod(O, P) {\n\t// 7.3.9.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true');\n\t}\n\n\t// 7.3.9.2\n\tvar func = GetV(O, P);\n\n\t// 7.3.9.4\n\tif (func == null) {\n\t\treturn void 0;\n\t}\n\n\t// 7.3.9.5\n\tif (!IsCallable(func)) {\n\t\tthrow new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));\n\t}\n\n\t// 7.3.9.6\n\treturn func;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar inspect = require('object-inspect');\n\nvar IsPropertyKey = require('./IsPropertyKey');\n// var ToObject = require('./ToObject');\n\n// https://262.ecma-international.org/6.0/#sec-getv\n\nmodule.exports = function GetV(V, P) {\n\t// 7.3.2.1\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));\n\t}\n\n\t// 7.3.2.2-3\n\t// var O = ToObject(V);\n\n\t// 7.3.2.4\n\treturn V[P];\n};\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.1\n\nmodule.exports = function IsAccessorDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-isarray\nmodule.exports = require('../helpers/IsArray');\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.11\n\nmodule.exports = require('is-callable');\n","'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic.js');\n\nvar $construct = GetIntrinsic('%Reflect.construct%', true);\n\nvar DefinePropertyOrThrow = require('./DefinePropertyOrThrow');\ntry {\n\tDefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });\n} catch (e) {\n\t// Accessor properties aren't supported\n\tDefinePropertyOrThrow = null;\n}\n\n// https://262.ecma-international.org/6.0/#sec-isconstructor\n\nif (DefinePropertyOrThrow && $construct) {\n\tvar isConstructorMarker = {};\n\tvar badArrayLike = {};\n\tDefinePropertyOrThrow(badArrayLike, 'length', {\n\t\t'[[Get]]': function () {\n\t\t\tthrow isConstructorMarker;\n\t\t},\n\t\t'[[Enumerable]]': true\n\t});\n\n\tmodule.exports = function IsConstructor(argument) {\n\t\ttry {\n\t\t\t// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:\n\t\t\t$construct(argument, badArrayLike);\n\t\t} catch (err) {\n\t\t\treturn err === isConstructorMarker;\n\t\t}\n\t};\n} else {\n\tmodule.exports = function IsConstructor(argument) {\n\t\t// unfortunately there's no way to truly check this without try/catch `new argument` in old environments\n\t\treturn typeof argument === 'function' && !!argument.prototype;\n\t};\n}\n","'use strict';\n\nvar has = require('has');\n\nvar Type = require('./Type');\n\nvar assertRecord = require('../helpers/assertRecord');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.2\n\nmodule.exports = function IsDataDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn false;\n\t}\n\n\tassertRecord(Type, 'Property Descriptor', 'Desc', Desc);\n\n\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// https://262.ecma-international.org/6.0/#sec-ispropertykey\n\nmodule.exports = function IsPropertyKey(argument) {\n\treturn typeof argument === 'string' || typeof argument === 'symbol';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $match = GetIntrinsic('%Symbol.match%', true);\n\nvar hasRegExpMatcher = require('is-regex');\n\nvar ToBoolean = require('./ToBoolean');\n\n// https://262.ecma-international.org/6.0/#sec-isregexp\n\nmodule.exports = function IsRegExp(argument) {\n\tif (!argument || typeof argument !== 'object') {\n\t\treturn false;\n\t}\n\tif ($match) {\n\t\tvar isRegExp = argument[$match];\n\t\tif (typeof isRegExp !== 'undefined') {\n\t\t\treturn ToBoolean(isRegExp);\n\t\t}\n\t}\n\treturn hasRegExpMatcher(argument);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $ObjectCreate = GetIntrinsic('%Object.create%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar IsArray = require('./IsArray');\nvar Type = require('./Type');\n\nvar forEach = require('../helpers/forEach');\n\nvar SLOT = require('internal-slot');\n\nvar hasProto = require('has-proto')();\n\n// https://262.ecma-international.org/11.0/#sec-objectcreate\n\nmodule.exports = function OrdinaryObjectCreate(proto) {\n\tif (proto !== null && Type(proto) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `proto` must be null or an object');\n\t}\n\tvar additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];\n\tif (!IsArray(additionalInternalSlotsList)) {\n\t\tthrow new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');\n\t}\n\n\t// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1\n\t// internalSlotsList.push(...additionalInternalSlotsList); // step 2\n\t// var O = MakeBasicObject(internalSlotsList); // step 3\n\t// setProto(O, proto); // step 4\n\t// return O; // step 5\n\n\tvar O;\n\tif ($ObjectCreate) {\n\t\tO = $ObjectCreate(proto);\n\t} else if (hasProto) {\n\t\tO = { __proto__: proto };\n\t} else {\n\t\tif (proto === null) {\n\t\t\tthrow new $SyntaxError('native Object.create support is required to create null objects');\n\t\t}\n\t\tvar T = function T() {};\n\t\tT.prototype = proto;\n\t\tO = new T();\n\t}\n\n\tif (additionalInternalSlotsList.length > 0) {\n\t\tforEach(additionalInternalSlotsList, function (slot) {\n\t\t\tSLOT.set(O, slot, void undefined);\n\t\t});\n\t}\n\n\treturn O;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar regexExec = require('call-bind/callBound')('RegExp.prototype.exec');\n\nvar Call = require('./Call');\nvar Get = require('./Get');\nvar IsCallable = require('./IsCallable');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-regexpexec\n\nmodule.exports = function RegExpExec(R, S) {\n\tif (Type(R) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `R` must be an Object');\n\t}\n\tif (Type(S) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `S` must be a String');\n\t}\n\tvar exec = Get(R, 'exec');\n\tif (IsCallable(exec)) {\n\t\tvar result = Call(exec, R, [S]);\n\t\tif (result === null || Type(result) === 'Object') {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new $TypeError('\"exec\" method must return `null` or an Object');\n\t}\n\treturn regexExec(R, S);\n};\n","'use strict';\n\nmodule.exports = require('../5/CheckObjectCoercible');\n","'use strict';\n\nvar $isNaN = require('../helpers/isNaN');\n\n// http://262.ecma-international.org/5.1/#sec-9.12\n\nmodule.exports = function SameValue(x, y) {\n\tif (x === y) { // 0 === -0, but they are not identical.\n\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\treturn true;\n\t}\n\treturn $isNaN(x) && $isNaN(y);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsPropertyKey = require('./IsPropertyKey');\nvar SameValue = require('./SameValue');\nvar Type = require('./Type');\n\n// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated\nvar noThrowOnStrictViolation = (function () {\n\ttry {\n\t\tdelete [].length;\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw\n\nmodule.exports = function Set(O, P, V, Throw) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: `O` must be an Object');\n\t}\n\tif (!IsPropertyKey(P)) {\n\t\tthrow new $TypeError('Assertion failed: `P` must be a Property Key');\n\t}\n\tif (Type(Throw) !== 'Boolean') {\n\t\tthrow new $TypeError('Assertion failed: `Throw` must be a Boolean');\n\t}\n\tif (Throw) {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\tif (noThrowOnStrictViolation && !SameValue(O[P], V)) {\n\t\t\tthrow new $TypeError('Attempted to assign to readonly property.');\n\t\t}\n\t\treturn true;\n\t}\n\ttry {\n\t\tO[P] = V; // eslint-disable-line no-param-reassign\n\t\treturn noThrowOnStrictViolation ? SameValue(O[P], V) : true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $species = GetIntrinsic('%Symbol.species%', true);\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar IsConstructor = require('./IsConstructor');\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/6.0/#sec-speciesconstructor\n\nmodule.exports = function SpeciesConstructor(O, defaultConstructor) {\n\tif (Type(O) !== 'Object') {\n\t\tthrow new $TypeError('Assertion failed: Type(O) is not Object');\n\t}\n\tvar C = O.constructor;\n\tif (typeof C === 'undefined') {\n\t\treturn defaultConstructor;\n\t}\n\tif (Type(C) !== 'Object') {\n\t\tthrow new $TypeError('O.constructor is not an Object');\n\t}\n\tvar S = $species ? C[$species] : void 0;\n\tif (S == null) {\n\t\treturn defaultConstructor;\n\t}\n\tif (IsConstructor(S)) {\n\t\treturn S;\n\t}\n\tthrow new $TypeError('no constructor found');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Number = GetIntrinsic('%Number%');\nvar $RegExp = GetIntrinsic('%RegExp%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInteger = GetIntrinsic('%parseInt%');\n\nvar callBound = require('call-bind/callBound');\nvar regexTester = require('safe-regex-test');\n\nvar $strSlice = callBound('String.prototype.slice');\nvar isBinary = regexTester(/^0b[01]+$/i);\nvar isOctal = regexTester(/^0o[0-7]+$/i);\nvar isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);\nvar nonWS = ['\\u0085', '\\u200b', '\\ufffe'].join('');\nvar nonWSregex = new $RegExp('[' + nonWS + ']', 'g');\nvar hasNonWS = regexTester(nonWSregex);\n\nvar $trim = require('string.prototype.trim');\n\nvar Type = require('./Type');\n\n// https://262.ecma-international.org/13.0/#sec-stringtonumber\n\nmodule.exports = function StringToNumber(argument) {\n\tif (Type(argument) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `argument` is not a String');\n\t}\n\tif (isBinary(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 2));\n\t}\n\tif (isOctal(argument)) {\n\t\treturn $Number($parseInteger($strSlice(argument, 2), 8));\n\t}\n\tif (hasNonWS(argument) || isInvalidHexLiteral(argument)) {\n\t\treturn NaN;\n\t}\n\tvar trimmed = $trim(argument);\n\tif (trimmed !== argument) {\n\t\treturn StringToNumber(trimmed);\n\t}\n\treturn $Number(argument);\n};\n","'use strict';\n\n// http://262.ecma-international.org/5.1/#sec-9.2\n\nmodule.exports = function ToBoolean(value) { return !!value; };\n","'use strict';\n\nvar ToNumber = require('./ToNumber');\nvar truncate = require('./truncate');\n\nvar $isNaN = require('../helpers/isNaN');\nvar $isFinite = require('../helpers/isFinite');\n\n// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity\n\nmodule.exports = function ToIntegerOrInfinity(value) {\n\tvar number = ToNumber(value);\n\tif ($isNaN(number) || number === 0) { return 0; }\n\tif (!$isFinite(number)) { return number; }\n\treturn truncate(number);\n};\n","'use strict';\n\nvar MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');\n\nvar ToIntegerOrInfinity = require('./ToIntegerOrInfinity');\n\nmodule.exports = function ToLength(argument) {\n\tvar len = ToIntegerOrInfinity(argument);\n\tif (len <= 0) { return 0; } // includes converting -0 to +0\n\tif (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }\n\treturn len;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $Number = GetIntrinsic('%Number%');\nvar isPrimitive = require('../helpers/isPrimitive');\n\nvar ToPrimitive = require('./ToPrimitive');\nvar StringToNumber = require('./StringToNumber');\n\n// https://262.ecma-international.org/13.0/#sec-tonumber\n\nmodule.exports = function ToNumber(argument) {\n\tvar value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);\n\tif (typeof value === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a number');\n\t}\n\tif (typeof value === 'bigint') {\n\t\tthrow new $TypeError('Conversion from \\'BigInt\\' to \\'number\\' is not allowed.');\n\t}\n\tif (typeof value === 'string') {\n\t\treturn StringToNumber(value);\n\t}\n\treturn $Number(value);\n};\n","'use strict';\n\nvar toPrimitive = require('es-to-primitive/es2015');\n\n// https://262.ecma-international.org/6.0/#sec-toprimitive\n\nmodule.exports = function ToPrimitive(input) {\n\tif (arguments.length > 1) {\n\t\treturn toPrimitive(input, arguments[1]);\n\t}\n\treturn toPrimitive(input);\n};\n","'use strict';\n\nvar has = require('has');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nvar Type = require('./Type');\nvar ToBoolean = require('./ToBoolean');\nvar IsCallable = require('./IsCallable');\n\n// https://262.ecma-international.org/5.1/#sec-8.10.5\n\nmodule.exports = function ToPropertyDescriptor(Obj) {\n\tif (Type(Obj) !== 'Object') {\n\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t}\n\n\tvar desc = {};\n\tif (has(Obj, 'enumerable')) {\n\t\tdesc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);\n\t}\n\tif (has(Obj, 'configurable')) {\n\t\tdesc['[[Configurable]]'] = ToBoolean(Obj.configurable);\n\t}\n\tif (has(Obj, 'value')) {\n\t\tdesc['[[Value]]'] = Obj.value;\n\t}\n\tif (has(Obj, 'writable')) {\n\t\tdesc['[[Writable]]'] = ToBoolean(Obj.writable);\n\t}\n\tif (has(Obj, 'get')) {\n\t\tvar getter = Obj.get;\n\t\tif (typeof getter !== 'undefined' && !IsCallable(getter)) {\n\t\t\tthrow new $TypeError('getter must be a function');\n\t\t}\n\t\tdesc['[[Get]]'] = getter;\n\t}\n\tif (has(Obj, 'set')) {\n\t\tvar setter = Obj.set;\n\t\tif (typeof setter !== 'undefined' && !IsCallable(setter)) {\n\t\t\tthrow new $TypeError('setter must be a function');\n\t\t}\n\t\tdesc['[[Set]]'] = setter;\n\t}\n\n\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t}\n\treturn desc;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $String = GetIntrinsic('%String%');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/6.0/#sec-tostring\n\nmodule.exports = function ToString(argument) {\n\tif (typeof argument === 'symbol') {\n\t\tthrow new $TypeError('Cannot convert a Symbol value to a string');\n\t}\n\treturn $String(argument);\n};\n","'use strict';\n\nvar ES5Type = require('../5/Type');\n\n// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values\n\nmodule.exports = function Type(x) {\n\tif (typeof x === 'symbol') {\n\t\treturn 'Symbol';\n\t}\n\tif (typeof x === 'bigint') {\n\t\treturn 'BigInt';\n\t}\n\treturn ES5Type(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $fromCharCode = GetIntrinsic('%String.fromCharCode%');\n\nvar isLeadingSurrogate = require('../helpers/isLeadingSurrogate');\nvar isTrailingSurrogate = require('../helpers/isTrailingSurrogate');\n\n// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair\n\nmodule.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {\n\tif (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {\n\t\tthrow new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');\n\t}\n\t// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n\treturn $fromCharCode(lead) + $fromCharCode(trail);\n};\n","'use strict';\n\nvar Type = require('./Type');\n\n// var modulo = require('./modulo');\nvar $floor = Math.floor;\n\n// http://262.ecma-international.org/11.0/#eqn-floor\n\nmodule.exports = function floor(x) {\n\t// return x - modulo(x, 1);\n\tif (Type(x) === 'BigInt') {\n\t\treturn x;\n\t}\n\treturn $floor(x);\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar floor = require('./floor');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// https://262.ecma-international.org/14.0/#eqn-truncate\n\nmodule.exports = function truncate(x) {\n\tif (typeof x !== 'number' && typeof x !== 'bigint') {\n\t\tthrow new $TypeError('argument must be a Number or a BigInt');\n\t}\n\tvar result = x < 0 ? -floor(-x) : floor(x);\n\treturn result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\n\n// http://262.ecma-international.org/5.1/#sec-9.10\n\nmodule.exports = function CheckObjectCoercible(value, optMessage) {\n\tif (value == null) {\n\t\tthrow new $TypeError(optMessage || ('Cannot call method on ' + value));\n\t}\n\treturn value;\n};\n","'use strict';\n\n// https://262.ecma-international.org/5.1/#sec-8\n\nmodule.exports = function Type(x) {\n\tif (x === null) {\n\t\treturn 'Null';\n\t}\n\tif (typeof x === 'undefined') {\n\t\treturn 'Undefined';\n\t}\n\tif (typeof x === 'function' || typeof x === 'object') {\n\t\treturn 'Object';\n\t}\n\tif (typeof x === 'number') {\n\t\treturn 'Number';\n\t}\n\tif (typeof x === 'boolean') {\n\t\treturn 'Boolean';\n\t}\n\tif (typeof x === 'string') {\n\t\treturn 'String';\n\t}\n};\n","'use strict';\n\n// TODO: remove, semver-major\n\nmodule.exports = require('get-intrinsic');\n","'use strict';\n\nvar hasPropertyDescriptors = require('has-property-descriptors');\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();\n\n// eslint-disable-next-line global-require\nvar isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');\n\nvar callBound = require('call-bind/callBound');\n\nvar $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');\n\n// eslint-disable-next-line max-params\nmodule.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {\n\tif (!$defineProperty) {\n\t\tif (!IsDataDescriptor(desc)) {\n\t\t\t// ES3 does not support getters/setters\n\t\t\treturn false;\n\t\t}\n\t\tif (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fallback for ES3\n\t\tif (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {\n\t\t\t// a non-enumerable existing property\n\t\t\treturn false;\n\t\t}\n\n\t\t// property does not exist at all, or exists but is enumerable\n\t\tvar V = desc['[[Value]]'];\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO[P] = V; // will use [[Define]]\n\t\treturn SameValue(O[P], V);\n\t}\n\tif (\n\t\thasArrayLengthDefineBug\n\t\t&& P === 'length'\n\t\t&& '[[Value]]' in desc\n\t\t&& isArray(O)\n\t\t&& O.length !== desc['[[Value]]']\n\t) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tO.length = desc['[[Value]]'];\n\t\treturn O.length === desc['[[Value]]'];\n\t}\n\n\t$defineProperty(O, P, FromPropertyDescriptor(desc));\n\treturn true;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $Array = GetIntrinsic('%Array%');\n\n// eslint-disable-next-line global-require\nvar toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');\n\nmodule.exports = $Array.isArray || function IsArray(argument) {\n\treturn toStr(argument) === '[object Array]';\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = require('has');\nvar isInteger = require('./isInteger');\n\nvar isMatchRecord = require('./isMatchRecord');\n\nvar predicates = {\n\t// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type\n\t'Property Descriptor': function isPropertyDescriptor(Desc) {\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tif (!Desc) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\t// https://262.ecma-international.org/13.0/#sec-match-records\n\t'Match Record': isMatchRecord,\n\t'Iterator Record': function isIteratorRecord(value) {\n\t\treturn has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]');\n\t},\n\t'PromiseCapability Record': function isPromiseCapabilityRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Resolve]]')\n\t\t\t&& typeof value['[[Resolve]]'] === 'function'\n\t\t\t&& has(value, '[[Reject]]')\n\t\t\t&& typeof value['[[Reject]]'] === 'function'\n\t\t\t&& has(value, '[[Promise]]')\n\t\t\t&& value['[[Promise]]']\n\t\t\t&& typeof value['[[Promise]]'].then === 'function';\n\t},\n\t'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) {\n\t\treturn !!value\n\t\t\t&& has(value, '[[Completion]]') // TODO: confirm is a completion record\n\t\t\t&& has(value, '[[Capability]]')\n\t\t\t&& predicates['PromiseCapability Record'](value['[[Capability]]']);\n\t},\n\t'RegExp Record': function isRegExpRecord(value) {\n\t\treturn value\n\t\t\t&& has(value, '[[IgnoreCase]]')\n\t\t\t&& typeof value['[[IgnoreCase]]'] === 'boolean'\n\t\t\t&& has(value, '[[Multiline]]')\n\t\t\t&& typeof value['[[Multiline]]'] === 'boolean'\n\t\t\t&& has(value, '[[DotAll]]')\n\t\t\t&& typeof value['[[DotAll]]'] === 'boolean'\n\t\t\t&& has(value, '[[Unicode]]')\n\t\t\t&& typeof value['[[Unicode]]'] === 'boolean'\n\t\t\t&& has(value, '[[CapturingGroupsCount]]')\n\t\t\t&& typeof value['[[CapturingGroupsCount]]'] === 'number'\n\t\t\t&& isInteger(value['[[CapturingGroupsCount]]'])\n\t\t\t&& value['[[CapturingGroupsCount]]'] >= 0;\n\t}\n};\n\nmodule.exports = function assertRecord(Type, recordType, argumentName, value) {\n\tvar predicate = predicates[recordType];\n\tif (typeof predicate !== 'function') {\n\t\tthrow new $SyntaxError('unknown record type: ' + recordType);\n\t}\n\tif (Type(value) !== 'Object' || !predicate(value)) {\n\t\tthrow new $TypeError(argumentName + ' must be a ' + recordType);\n\t}\n};\n","'use strict';\n\nmodule.exports = function forEach(array, callback) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tcallback(array[i], i, array); // eslint-disable-line callback-return\n\t}\n};\n","'use strict';\n\nmodule.exports = function fromPropertyDescriptor(Desc) {\n\tif (typeof Desc === 'undefined') {\n\t\treturn Desc;\n\t}\n\tvar obj = {};\n\tif ('[[Value]]' in Desc) {\n\t\tobj.value = Desc['[[Value]]'];\n\t}\n\tif ('[[Writable]]' in Desc) {\n\t\tobj.writable = !!Desc['[[Writable]]'];\n\t}\n\tif ('[[Get]]' in Desc) {\n\t\tobj.get = Desc['[[Get]]'];\n\t}\n\tif ('[[Set]]' in Desc) {\n\t\tobj.set = Desc['[[Set]]'];\n\t}\n\tif ('[[Enumerable]]' in Desc) {\n\t\tobj.enumerable = !!Desc['[[Enumerable]]'];\n\t}\n\tif ('[[Configurable]]' in Desc) {\n\t\tobj.configurable = !!Desc['[[Configurable]]'];\n\t}\n\treturn obj;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\nmodule.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $abs = GetIntrinsic('%Math.abs%');\nvar $floor = GetIntrinsic('%Math.floor%');\n\nvar $isNaN = require('./isNaN');\nvar $isFinite = require('./isFinite');\n\nmodule.exports = function isInteger(argument) {\n\tif (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {\n\t\treturn false;\n\t}\n\tvar absValue = $abs(argument);\n\treturn $floor(absValue) === absValue;\n};\n\n","'use strict';\n\nmodule.exports = function isLeadingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xD800 && charCode <= 0xDBFF;\n};\n","'use strict';\n\nvar has = require('has');\n\n// https://262.ecma-international.org/13.0/#sec-match-records\n\nmodule.exports = function isMatchRecord(record) {\n\treturn (\n\t\thas(record, '[[StartIndex]]')\n && has(record, '[[EndIndex]]')\n && record['[[StartIndex]]'] >= 0\n && record['[[EndIndex]]'] >= record['[[StartIndex]]']\n && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])\n && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])\n\t);\n};\n","'use strict';\n\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar has = require('has');\nvar $TypeError = GetIntrinsic('%TypeError%');\n\nmodule.exports = function IsPropertyDescriptor(ES, Desc) {\n\tif (ES.Type(Desc) !== 'Object') {\n\t\treturn false;\n\t}\n\tvar allowed = {\n\t\t'[[Configurable]]': true,\n\t\t'[[Enumerable]]': true,\n\t\t'[[Get]]': true,\n\t\t'[[Set]]': true,\n\t\t'[[Value]]': true,\n\t\t'[[Writable]]': true\n\t};\n\n\tfor (var key in Desc) { // eslint-disable-line no-restricted-syntax\n\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {\n\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t}\n\treturn true;\n};\n","'use strict';\n\nmodule.exports = function isTrailingSurrogate(charCode) {\n\treturn typeof charCode === 'number' && charCode >= 0xDC00 && charCode <= 0xDFFF;\n};\n","'use strict';\n\nmodule.exports = Number.MAX_SAFE_INTEGER || 9007199254740991; // Math.pow(2, 53) - 1;\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\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","const debug = false;\nexport function log(...args) {\n if (debug) {\n console.log(...args);\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { log } from \"./log\";\n/**\n * Transforms a DOMRect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomDomRect(rect, zoomLevel) {\n return new DOMRect(rect.x / zoomLevel, rect.y / zoomLevel, rect.width / zoomLevel, rect.height / zoomLevel);\n}\n/**\n * Transforms a rect into the zoomed coordinate system.\n *\n * See https://issues.chromium.org/issues/40391865#comment9\n */\nexport function dezoomRect(rect, zoomLevel) {\n return {\n bottom: rect.bottom / zoomLevel,\n height: rect.height / zoomLevel,\n left: rect.left / zoomLevel,\n right: rect.right / zoomLevel,\n top: rect.top / zoomLevel,\n width: rect.width / zoomLevel,\n };\n}\nexport function domRectToRect(rect) {\n return {\n width: rect.width,\n height: rect.height,\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n };\n}\nexport function getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects) {\n const clientRects = range.getClientRects();\n const tolerance = 1;\n const originalRects = [];\n for (const rangeClientRect of clientRects) {\n originalRects.push({\n bottom: rangeClientRect.bottom,\n height: rangeClientRect.height,\n left: rangeClientRect.left,\n right: rangeClientRect.right,\n top: rangeClientRect.top,\n width: rangeClientRect.width,\n });\n }\n const mergedRects = mergeTouchingRects(originalRects, tolerance, doNotMergeHorizontallyAlignedRects);\n const noContainedRects = removeContainedRects(mergedRects, tolerance);\n const newRects = replaceOverlapingRects(noContainedRects);\n const minArea = 2 * 2;\n for (let j = newRects.length - 1; j >= 0; j--) {\n const rect = newRects[j];\n const bigEnough = rect.width * rect.height > minArea;\n if (!bigEnough) {\n if (newRects.length > 1) {\n log(\"CLIENT RECT: remove small\");\n newRects.splice(j, 1);\n }\n else {\n log(\"CLIENT RECT: remove small, but keep otherwise empty!\");\n break;\n }\n }\n }\n log(`CLIENT RECT: reduced ${originalRects.length} --> ${newRects.length}`);\n return newRects;\n}\nfunction mergeTouchingRects(rects, tolerance, doNotMergeHorizontallyAlignedRects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"mergeTouchingRects rect1 === rect2 ??!\");\n continue;\n }\n const rectsLineUpVertically = almostEqual(rect1.top, rect2.top, tolerance) &&\n almostEqual(rect1.bottom, rect2.bottom, tolerance);\n const rectsLineUpHorizontally = almostEqual(rect1.left, rect2.left, tolerance) &&\n almostEqual(rect1.right, rect2.right, tolerance);\n const horizontalAllowed = !doNotMergeHorizontallyAlignedRects;\n const aligned = (rectsLineUpHorizontally && horizontalAllowed) ||\n (rectsLineUpVertically && !rectsLineUpHorizontally);\n const canMerge = aligned && rectsTouchOrOverlap(rect1, rect2, tolerance);\n if (canMerge) {\n log(`CLIENT RECT: merging two into one, VERTICAL: ${rectsLineUpVertically} HORIZONTAL: ${rectsLineUpHorizontally} (${doNotMergeHorizontallyAlignedRects})`);\n const newRects = rects.filter((rect) => {\n return rect !== rect1 && rect !== rect2;\n });\n const replacementClientRect = getBoundingRect(rect1, rect2);\n newRects.push(replacementClientRect);\n return mergeTouchingRects(newRects, tolerance, doNotMergeHorizontallyAlignedRects);\n }\n }\n }\n return rects;\n}\nfunction getBoundingRect(rect1, rect2) {\n const left = Math.min(rect1.left, rect2.left);\n const right = Math.max(rect1.right, rect2.right);\n const top = Math.min(rect1.top, rect2.top);\n const bottom = Math.max(rect1.bottom, rect2.bottom);\n return {\n bottom,\n height: bottom - top,\n left,\n right,\n top,\n width: right - left,\n };\n}\nfunction removeContainedRects(rects, tolerance) {\n const rectsToKeep = new Set(rects);\n for (const rect of rects) {\n const bigEnough = rect.width > 1 && rect.height > 1;\n if (!bigEnough) {\n log(\"CLIENT RECT: remove tiny\");\n rectsToKeep.delete(rect);\n continue;\n }\n for (const possiblyContainingRect of rects) {\n if (rect === possiblyContainingRect) {\n continue;\n }\n if (!rectsToKeep.has(possiblyContainingRect)) {\n continue;\n }\n if (rectContains(possiblyContainingRect, rect, tolerance)) {\n log(\"CLIENT RECT: remove contained\");\n rectsToKeep.delete(rect);\n break;\n }\n }\n }\n return Array.from(rectsToKeep);\n}\nfunction rectContains(rect1, rect2, tolerance) {\n return (rectContainsPoint(rect1, rect2.left, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.top, tolerance) &&\n rectContainsPoint(rect1, rect2.left, rect2.bottom, tolerance) &&\n rectContainsPoint(rect1, rect2.right, rect2.bottom, tolerance));\n}\nexport function rectContainsPoint(rect, x, y, tolerance) {\n return ((rect.left < x || almostEqual(rect.left, x, tolerance)) &&\n (rect.right > x || almostEqual(rect.right, x, tolerance)) &&\n (rect.top < y || almostEqual(rect.top, y, tolerance)) &&\n (rect.bottom > y || almostEqual(rect.bottom, y, tolerance)));\n}\nfunction replaceOverlapingRects(rects) {\n for (let i = 0; i < rects.length; i++) {\n for (let j = i + 1; j < rects.length; j++) {\n const rect1 = rects[i];\n const rect2 = rects[j];\n if (rect1 === rect2) {\n log(\"replaceOverlapingRects rect1 === rect2 ??!\");\n continue;\n }\n if (rectsTouchOrOverlap(rect1, rect2, -1)) {\n let toAdd = [];\n let toRemove;\n const subtractRects1 = rectSubtract(rect1, rect2);\n if (subtractRects1.length === 1) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n const subtractRects2 = rectSubtract(rect2, rect1);\n if (subtractRects1.length < subtractRects2.length) {\n toAdd = subtractRects1;\n toRemove = rect1;\n }\n else {\n toAdd = subtractRects2;\n toRemove = rect2;\n }\n }\n log(`CLIENT RECT: overlap, cut one rect into ${toAdd.length}`);\n const newRects = rects.filter((rect) => {\n return rect !== toRemove;\n });\n Array.prototype.push.apply(newRects, toAdd);\n return replaceOverlapingRects(newRects);\n }\n }\n }\n return rects;\n}\nfunction rectSubtract(rect1, rect2) {\n const rectIntersected = rectIntersect(rect2, rect1);\n if (rectIntersected.height === 0 || rectIntersected.width === 0) {\n return [rect1];\n }\n const rects = [];\n {\n const rectA = {\n bottom: rect1.bottom,\n height: 0,\n left: rect1.left,\n right: rectIntersected.left,\n top: rect1.top,\n width: 0,\n };\n rectA.width = rectA.right - rectA.left;\n rectA.height = rectA.bottom - rectA.top;\n if (rectA.height !== 0 && rectA.width !== 0) {\n rects.push(rectA);\n }\n }\n {\n const rectB = {\n bottom: rectIntersected.top,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rect1.top,\n width: 0,\n };\n rectB.width = rectB.right - rectB.left;\n rectB.height = rectB.bottom - rectB.top;\n if (rectB.height !== 0 && rectB.width !== 0) {\n rects.push(rectB);\n }\n }\n {\n const rectC = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.left,\n right: rectIntersected.right,\n top: rectIntersected.bottom,\n width: 0,\n };\n rectC.width = rectC.right - rectC.left;\n rectC.height = rectC.bottom - rectC.top;\n if (rectC.height !== 0 && rectC.width !== 0) {\n rects.push(rectC);\n }\n }\n {\n const rectD = {\n bottom: rect1.bottom,\n height: 0,\n left: rectIntersected.right,\n right: rect1.right,\n top: rect1.top,\n width: 0,\n };\n rectD.width = rectD.right - rectD.left;\n rectD.height = rectD.bottom - rectD.top;\n if (rectD.height !== 0 && rectD.width !== 0) {\n rects.push(rectD);\n }\n }\n return rects;\n}\nfunction rectIntersect(rect1, rect2) {\n const maxLeft = Math.max(rect1.left, rect2.left);\n const minRight = Math.min(rect1.right, rect2.right);\n const maxTop = Math.max(rect1.top, rect2.top);\n const minBottom = Math.min(rect1.bottom, rect2.bottom);\n return {\n bottom: minBottom,\n height: Math.max(0, minBottom - maxTop),\n left: maxLeft,\n right: minRight,\n top: maxTop,\n width: Math.max(0, minRight - maxLeft),\n };\n}\nfunction rectsTouchOrOverlap(rect1, rect2, tolerance) {\n return ((rect1.left < rect2.right ||\n (tolerance >= 0 && almostEqual(rect1.left, rect2.right, tolerance))) &&\n (rect2.left < rect1.right ||\n (tolerance >= 0 && almostEqual(rect2.left, rect1.right, tolerance))) &&\n (rect1.top < rect2.bottom ||\n (tolerance >= 0 && almostEqual(rect1.top, rect2.bottom, tolerance))) &&\n (rect2.top < rect1.bottom ||\n (tolerance >= 0 && almostEqual(rect2.top, rect1.bottom, tolerance))));\n}\nfunction almostEqual(a, b, tolerance) {\n return Math.abs(a - b) <= tolerance;\n}\n","/**\n * From which direction to evaluate strings or nodes: from the start of a string\n * or range seeking Forwards, or from the end seeking Backwards.\n */\nvar TrimDirection;\n(function (TrimDirection) {\n TrimDirection[TrimDirection[\"Forwards\"] = 1] = \"Forwards\";\n TrimDirection[TrimDirection[\"Backwards\"] = 2] = \"Backwards\";\n})(TrimDirection || (TrimDirection = {}));\n/**\n * Return the offset of the nearest non-whitespace character to `baseOffset`\n * within the string `text`, looking in the `direction` indicated. Return -1 if\n * no non-whitespace character exists between `baseOffset` (inclusive) and the\n * terminus of the string (start or end depending on `direction`).\n */\nfunction closestNonSpaceInString(text, baseOffset, direction) {\n const nextChar = direction === TrimDirection.Forwards ? baseOffset : baseOffset - 1;\n if (text.charAt(nextChar).trim() !== \"\") {\n // baseOffset is already valid: it points at a non-whitespace character\n return baseOffset;\n }\n let availableChars;\n let availableNonWhitespaceChars;\n if (direction === TrimDirection.Backwards) {\n availableChars = text.substring(0, baseOffset);\n availableNonWhitespaceChars = availableChars.trimEnd();\n }\n else {\n availableChars = text.substring(baseOffset);\n availableNonWhitespaceChars = availableChars.trimStart();\n }\n if (!availableNonWhitespaceChars.length) {\n return -1;\n }\n const offsetDelta = availableChars.length - availableNonWhitespaceChars.length;\n return direction === TrimDirection.Backwards\n ? baseOffset - offsetDelta\n : baseOffset + offsetDelta;\n}\n/**\n * Calculate a new Range start position (TrimDirection.Forwards) or end position\n * (Backwards) for `range` that represents the nearest non-whitespace character,\n * moving into the `range` away from the relevant initial boundary node towards\n * the terminating boundary node.\n *\n * @throws {RangeError} If no text node with non-whitespace characters found\n */\nfunction closestNonSpaceInRange(range, direction) {\n const nodeIter = range.commonAncestorContainer.ownerDocument.createNodeIterator(range.commonAncestorContainer, NodeFilter.SHOW_TEXT);\n const initialBoundaryNode = direction === TrimDirection.Forwards\n ? range.startContainer\n : range.endContainer;\n const terminalBoundaryNode = direction === TrimDirection.Forwards\n ? range.endContainer\n : range.startContainer;\n let currentNode = nodeIter.nextNode();\n // Advance the NodeIterator to the `initialBoundaryNode`\n while (currentNode && currentNode !== initialBoundaryNode) {\n currentNode = nodeIter.nextNode();\n }\n if (direction === TrimDirection.Backwards) {\n // Reverse the NodeIterator direction. This will return the same node\n // as the previous `nextNode()` call (initial boundary node).\n currentNode = nodeIter.previousNode();\n }\n let trimmedOffset = -1;\n const advance = () => {\n currentNode =\n direction === TrimDirection.Forwards\n ? nodeIter.nextNode()\n : nodeIter.previousNode();\n if (currentNode) {\n const nodeText = currentNode.textContent;\n const baseOffset = direction === TrimDirection.Forwards ? 0 : nodeText.length;\n trimmedOffset = closestNonSpaceInString(nodeText, baseOffset, direction);\n }\n };\n while (currentNode &&\n trimmedOffset === -1 &&\n currentNode !== terminalBoundaryNode) {\n advance();\n }\n if (currentNode && trimmedOffset >= 0) {\n return { node: currentNode, offset: trimmedOffset };\n }\n /* istanbul ignore next */\n throw new RangeError(\"No text nodes with non-whitespace text found in range\");\n}\n/**\n * Return a new DOM Range that adjusts the start and end positions of `range` as\n * needed such that:\n *\n * - `startContainer` and `endContainer` text nodes both contain at least one\n * non-whitespace character within the Range's text content\n * - `startOffset` and `endOffset` both reference non-whitespace characters,\n * with `startOffset` immediately before the first non-whitespace character\n * and `endOffset` immediately after the last\n *\n * Whitespace characters are those that are removed by `String.prototype.trim()`\n *\n * @param range - A DOM Range that whose `startContainer` and `endContainer` are\n * both text nodes, and which contains at least one non-whitespace character.\n * @throws {RangeError}\n */\nexport function trimRange(range) {\n if (!range.toString().trim().length) {\n throw new RangeError(\"Range contains no non-whitespace text\");\n }\n if (range.startContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range startContainer is not a text node\");\n }\n if (range.endContainer.nodeType !== Node.TEXT_NODE) {\n throw new RangeError(\"Range endContainer is not a text node\");\n }\n const trimmedRange = range.cloneRange();\n let startTrimmed = false;\n let endTrimmed = false;\n const trimmedOffsets = {\n start: closestNonSpaceInString(range.startContainer.textContent, range.startOffset, TrimDirection.Forwards),\n end: closestNonSpaceInString(range.endContainer.textContent, range.endOffset, TrimDirection.Backwards),\n };\n if (trimmedOffsets.start >= 0) {\n trimmedRange.setStart(range.startContainer, trimmedOffsets.start);\n startTrimmed = true;\n }\n // Note: An offset of 0 is invalid for an end offset, as no text in the\n // node would be included in the range.\n if (trimmedOffsets.end > 0) {\n trimmedRange.setEnd(range.endContainer, trimmedOffsets.end);\n endTrimmed = true;\n }\n if (startTrimmed && endTrimmed) {\n return trimmedRange;\n }\n if (!startTrimmed) {\n // There are no (non-whitespace) characters between `startOffset` and the\n // end of the `startContainer` node.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Forwards);\n if (node && offset >= 0) {\n trimmedRange.setStart(node, offset);\n }\n }\n if (!endTrimmed) {\n // There are no (non-whitespace) characters between the start of the Range's\n // `endContainer` text content and the `endOffset`.\n const { node, offset } = closestNonSpaceInRange(trimmedRange, TrimDirection.Backwards);\n if (node && offset > 0) {\n trimmedRange.setEnd(node, offset);\n }\n }\n return trimmedRange;\n}\n","import { trimRange } from \"./trim-range\";\n/**\n * Return the combined length of text nodes contained in `node`.\n */\nfunction nodeTextLength(node) {\n var _a, _b;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.TEXT_NODE:\n // nb. `textContent` excludes text in comments and processing instructions\n // when called on a parent element, so we don't need to subtract that here.\n return (_b = (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;\n default:\n return 0;\n }\n}\n/**\n * Return the total length of the text of all previous siblings of `node`.\n */\nfunction previousSiblingsTextLength(node) {\n let sibling = node.previousSibling;\n let length = 0;\n while (sibling) {\n length += nodeTextLength(sibling);\n sibling = sibling.previousSibling;\n }\n return length;\n}\n/**\n * Resolve one or more character offsets within an element to (text node,\n * position) pairs.\n *\n * @param element\n * @param offsets - Offsets, which must be sorted in ascending order\n * @throws {RangeError}\n */\nfunction resolveOffsets(element, ...offsets) {\n let nextOffset = offsets.shift();\n const nodeIter = element.ownerDocument.createNodeIterator(element, NodeFilter.SHOW_TEXT);\n const results = [];\n let currentNode = nodeIter.nextNode();\n let textNode;\n let length = 0;\n // Find the text node containing the `nextOffset`th character from the start\n // of `element`.\n while (nextOffset !== undefined && currentNode) {\n textNode = currentNode;\n if (length + textNode.data.length > nextOffset) {\n results.push({ node: textNode, offset: nextOffset - length });\n nextOffset = offsets.shift();\n }\n else {\n currentNode = nodeIter.nextNode();\n length += textNode.data.length;\n }\n }\n // Boundary case.\n while (nextOffset !== undefined && textNode && length === nextOffset) {\n results.push({ node: textNode, offset: textNode.data.length });\n nextOffset = offsets.shift();\n }\n if (nextOffset !== undefined) {\n throw new RangeError(\"Offset exceeds text length\");\n }\n return results;\n}\n/**\n * When resolving a TextPosition, specifies the direction to search for the\n * nearest text node if `offset` is `0` and the element has no text.\n */\nexport var ResolveDirection;\n(function (ResolveDirection) {\n ResolveDirection[ResolveDirection[\"FORWARDS\"] = 1] = \"FORWARDS\";\n ResolveDirection[ResolveDirection[\"BACKWARDS\"] = 2] = \"BACKWARDS\";\n})(ResolveDirection || (ResolveDirection = {}));\n/**\n * Represents an offset within the text content of an element.\n *\n * This position can be resolved to a specific descendant node in the current\n * DOM subtree of the element using the `resolve` method.\n */\nexport class TextPosition {\n constructor(element, offset) {\n if (offset < 0) {\n throw new Error(\"Offset is invalid\");\n }\n /** Element that `offset` is relative to. */\n this.element = element;\n /** Character offset from the start of the element's `textContent`. */\n this.offset = offset;\n }\n /**\n * Return a copy of this position with offset relative to a given ancestor\n * element.\n *\n * @param parent - Ancestor of `this.element`\n */\n relativeTo(parent) {\n if (!parent.contains(this.element)) {\n throw new Error(\"Parent is not an ancestor of current element\");\n }\n let el = this.element;\n let offset = this.offset;\n while (el !== parent) {\n offset += previousSiblingsTextLength(el);\n el = el.parentElement;\n }\n return new TextPosition(el, offset);\n }\n /**\n * Resolve the position to a specific text node and offset within that node.\n *\n * Throws if `this.offset` exceeds the length of the element's text. In the\n * case where the element has no text and `this.offset` is 0, the `direction`\n * option determines what happens.\n *\n * Offsets at the boundary between two nodes are resolved to the start of the\n * node that begins at the boundary.\n *\n * @param options.direction - Specifies in which direction to search for the\n * nearest text node if `this.offset` is `0` and\n * `this.element` has no text. If not specified an\n * error is thrown.\n *\n * @throws {RangeError}\n */\n resolve(options = {}) {\n try {\n return resolveOffsets(this.element, this.offset)[0];\n }\n catch (err) {\n if (this.offset === 0 && options.direction !== undefined) {\n const tw = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);\n tw.currentNode = this.element;\n const forwards = options.direction === ResolveDirection.FORWARDS;\n const text = forwards\n ? tw.nextNode()\n : tw.previousNode();\n if (!text) {\n throw err;\n }\n return { node: text, offset: forwards ? 0 : text.data.length };\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Construct a `TextPosition` that refers to the `offset`th character within\n * `node`.\n */\n static fromCharOffset(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return TextPosition.fromPoint(node, offset);\n case Node.ELEMENT_NODE:\n return new TextPosition(node, offset);\n default:\n throw new Error(\"Node is not an element or text node\");\n }\n }\n /**\n * Construct a `TextPosition` representing the range start or end point (node, offset).\n *\n * @param node\n * @param offset - Offset within the node\n */\n static fromPoint(node, offset) {\n switch (node.nodeType) {\n case Node.TEXT_NODE: {\n if (offset < 0 || offset > node.data.length) {\n throw new Error(\"Text node offset is out of range\");\n }\n if (!node.parentElement) {\n throw new Error(\"Text node has no parent\");\n }\n // Get the offset from the start of the parent element.\n const textOffset = previousSiblingsTextLength(node) + offset;\n return new TextPosition(node.parentElement, textOffset);\n }\n case Node.ELEMENT_NODE: {\n if (offset < 0 || offset > node.childNodes.length) {\n throw new Error(\"Child node offset is out of range\");\n }\n // Get the text length before the `offset`th child of element.\n let textOffset = 0;\n for (let i = 0; i < offset; i++) {\n textOffset += nodeTextLength(node.childNodes[i]);\n }\n return new TextPosition(node, textOffset);\n }\n default:\n throw new Error(\"Point is not in an element or text node\");\n }\n }\n}\n/**\n * Represents a region of a document as a (start, end) pair of `TextPosition` points.\n *\n * Representing a range in this way allows for changes in the DOM content of the\n * range which don't affect its text content, without affecting the text content\n * of the range itself.\n */\nexport class TextRange {\n constructor(start, end) {\n this.start = start;\n this.end = end;\n }\n /**\n * Create a new TextRange whose `start` and `end` are computed relative to\n * `element`. `element` must be an ancestor of both `start.element` and\n * `end.element`.\n */\n relativeTo(element) {\n return new TextRange(this.start.relativeTo(element), this.end.relativeTo(element));\n }\n /**\n * Resolve this TextRange to a (DOM) Range.\n *\n * The resulting DOM Range will always start and end in a `Text` node.\n * Hence `TextRange.fromRange(range).toRange()` can be used to \"shrink\" a\n * range to the text it contains.\n *\n * May throw if the `start` or `end` positions cannot be resolved to a range.\n */\n toRange() {\n let start;\n let end;\n if (this.start.element === this.end.element &&\n this.start.offset <= this.end.offset) {\n // Fast path for start and end points in same element.\n [start, end] = resolveOffsets(this.start.element, this.start.offset, this.end.offset);\n }\n else {\n start = this.start.resolve({\n direction: ResolveDirection.FORWARDS,\n });\n end = this.end.resolve({ direction: ResolveDirection.BACKWARDS });\n }\n const range = new Range();\n range.setStart(start.node, start.offset);\n range.setEnd(end.node, end.offset);\n return range;\n }\n /**\n * Create a TextRange from a (DOM) Range\n */\n static fromRange(range) {\n const start = TextPosition.fromPoint(range.startContainer, range.startOffset);\n const end = TextPosition.fromPoint(range.endContainer, range.endOffset);\n return new TextRange(start, end);\n }\n /**\n * Create a TextRange representing the `start`th to `end`th characters in\n * `root`\n */\n static fromOffsets(root, start, end) {\n return new TextRange(new TextPosition(root, start), new TextPosition(root, end));\n }\n /**\n * Return a new Range representing `range` trimmed of any leading or trailing\n * whitespace\n */\n static trimmedRange(range) {\n return trimRange(TextRange.fromRange(range).toRange());\n }\n}\n","import approxSearch from \"approx-string-match\";\n/**\n * Find the best approximate matches for `str` in `text` allowing up to\n * `maxErrors` errors.\n */\nfunction search(text, str, maxErrors) {\n // Do a fast search for exact matches. The `approx-string-match` library\n // doesn't currently incorporate this optimization itself.\n let matchPos = 0;\n const exactMatches = [];\n while (matchPos !== -1) {\n matchPos = text.indexOf(str, matchPos);\n if (matchPos !== -1) {\n exactMatches.push({\n start: matchPos,\n end: matchPos + str.length,\n errors: 0,\n });\n matchPos += 1;\n }\n }\n if (exactMatches.length > 0) {\n return exactMatches;\n }\n // If there are no exact matches, do a more expensive search for matches\n // with errors.\n return approxSearch(text, str, maxErrors);\n}\n/**\n * Compute a score between 0 and 1.0 for the similarity between `text` and `str`.\n */\nfunction textMatchScore(text, str) {\n // `search` will return no matches if either the text or pattern is empty,\n // otherwise it will return at least one match if the max allowed error count\n // is at least `str.length`.\n if (str.length === 0 || text.length === 0) {\n return 0.0;\n }\n const matches = search(text, str, str.length);\n // prettier-ignore\n return 1 - (matches[0].errors / str.length);\n}\n/**\n * Find the best approximate match for `quote` in `text`.\n *\n * @param text - Document text to search\n * @param quote - String to find within `text`\n * @param context - Context in which the quote originally appeared. This is\n * used to choose the best match.\n * @return `null` if no match exceeding the minimum quality threshold was found.\n */\nexport function matchQuote(text, quote, context = {}) {\n if (quote.length === 0) {\n return null;\n }\n // Choose the maximum number of errors to allow for the initial search.\n // This choice involves a tradeoff between:\n //\n // - Recall (proportion of \"good\" matches found)\n // - Precision (proportion of matches found which are \"good\")\n // - Cost of the initial search and of processing the candidate matches [1]\n //\n // [1] Specifically, the expected-time complexity of the initial search is\n // `O((maxErrors / 32) * text.length)`. See `approx-string-match` docs.\n const maxErrors = Math.min(256, quote.length / 2);\n // Find the closest matches for `quote` in `text` based on edit distance.\n const matches = search(text, quote, maxErrors);\n if (matches.length === 0) {\n return null;\n }\n /**\n * Compute a score between 0 and 1.0 for a match candidate.\n */\n const scoreMatch = (match) => {\n const quoteWeight = 50; // Similarity of matched text to quote.\n const prefixWeight = 20; // Similarity of text before matched text to `context.prefix`.\n const suffixWeight = 20; // Similarity of text after matched text to `context.suffix`.\n const posWeight = 2; // Proximity to expected location. Used as a tie-breaker.\n const quoteScore = 1 - match.errors / quote.length;\n const prefixScore = context.prefix\n ? textMatchScore(text.slice(Math.max(0, match.start - context.prefix.length), match.start), context.prefix)\n : 1.0;\n const suffixScore = context.suffix\n ? textMatchScore(text.slice(match.end, match.end + context.suffix.length), context.suffix)\n : 1.0;\n let posScore = 1.0;\n if (typeof context.hint === \"number\") {\n const offset = Math.abs(match.start - context.hint);\n posScore = 1.0 - offset / text.length;\n }\n const rawScore = quoteWeight * quoteScore +\n prefixWeight * prefixScore +\n suffixWeight * suffixScore +\n posWeight * posScore;\n const maxScore = quoteWeight + prefixWeight + suffixWeight + posWeight;\n const normalizedScore = rawScore / maxScore;\n return normalizedScore;\n };\n // Rank matches based on similarity of actual and expected surrounding text\n // and actual/expected offset in the document text.\n const scoredMatches = matches.map((m) => ({\n start: m.start,\n end: m.end,\n score: scoreMatch(m),\n }));\n // Choose match with the highest score.\n scoredMatches.sort((a, b) => b.score - a.score);\n return scoredMatches[0];\n}\n","import { matchQuote } from \"./match-quote\";\nimport { TextRange, TextPosition } from \"./text-range\";\nimport { nodeFromXPath, xpathFromNode } from \"./xpath\";\n/**\n * Converts between `RangeSelector` selectors and `Range` objects.\n */\nexport class RangeAnchor {\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n constructor(root, range) {\n this.root = root;\n this.range = range;\n }\n /**\n * @param root - A root element from which to anchor.\n * @param range - A range describing the anchor.\n */\n static fromRange(root, range) {\n return new RangeAnchor(root, range);\n }\n /**\n * Create an anchor from a serialized `RangeSelector` selector.\n *\n * @param root - A root element from which to anchor.\n */\n static fromSelector(root, selector) {\n const startContainer = nodeFromXPath(selector.startContainer, root);\n if (!startContainer) {\n throw new Error(\"Failed to resolve startContainer XPath\");\n }\n const endContainer = nodeFromXPath(selector.endContainer, root);\n if (!endContainer) {\n throw new Error(\"Failed to resolve endContainer XPath\");\n }\n const startPos = TextPosition.fromCharOffset(startContainer, selector.startOffset);\n const endPos = TextPosition.fromCharOffset(endContainer, selector.endOffset);\n const range = new TextRange(startPos, endPos).toRange();\n return new RangeAnchor(root, range);\n }\n toRange() {\n return this.range;\n }\n toSelector() {\n // \"Shrink\" the range so that it tightly wraps its text. This ensures more\n // predictable output for a given text selection.\n const normalizedRange = TextRange.fromRange(this.range).toRange();\n const textRange = TextRange.fromRange(normalizedRange);\n const startContainer = xpathFromNode(textRange.start.element, this.root);\n const endContainer = xpathFromNode(textRange.end.element, this.root);\n return {\n type: \"RangeSelector\",\n startContainer,\n startOffset: textRange.start.offset,\n endContainer,\n endOffset: textRange.end.offset,\n };\n }\n}\n/**\n * Converts between `TextPositionSelector` selectors and `Range` objects.\n */\nexport class TextPositionAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n static fromRange(root, range) {\n const textRange = TextRange.fromRange(range).relativeTo(root);\n return new TextPositionAnchor(root, textRange.start.offset, textRange.end.offset);\n }\n static fromSelector(root, selector) {\n return new TextPositionAnchor(root, selector.start, selector.end);\n }\n toSelector() {\n return {\n type: \"TextPositionSelector\",\n start: this.start,\n end: this.end,\n };\n }\n toRange() {\n return TextRange.fromOffsets(this.root, this.start, this.end).toRange();\n }\n}\n/**\n * Converts between `TextQuoteSelector` selectors and `Range` objects.\n */\nexport class TextQuoteAnchor {\n /**\n * @param root - A root element from which to anchor.\n */\n constructor(root, exact, context = {}) {\n this.root = root;\n this.exact = exact;\n this.context = context;\n }\n /**\n * Create a `TextQuoteAnchor` from a range.\n *\n * Will throw if `range` does not contain any text nodes.\n */\n static fromRange(root, range) {\n const text = root.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(root);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n // Number of characters around the quote to capture as context. We currently\n // always use a fixed amount, but it would be better if this code was aware\n // of logical boundaries in the document (paragraph, article etc.) to avoid\n // capturing text unrelated to the quote.\n //\n // In regular prose the ideal content would often be the surrounding sentence.\n // This is a natural unit of meaning which enables displaying quotes in\n // context even when the document is not available. We could use `Intl.Segmenter`\n // for this when available.\n const contextLen = 32;\n return new TextQuoteAnchor(root, text.slice(start, end), {\n prefix: text.slice(Math.max(0, start - contextLen), start),\n suffix: text.slice(end, Math.min(text.length, end + contextLen)),\n });\n }\n static fromSelector(root, selector) {\n const { prefix, suffix } = selector;\n return new TextQuoteAnchor(root, selector.exact, { prefix, suffix });\n }\n toSelector() {\n return {\n type: \"TextQuoteSelector\",\n exact: this.exact,\n prefix: this.context.prefix,\n suffix: this.context.suffix,\n };\n }\n toRange(options = {}) {\n return this.toPositionAnchor(options).toRange();\n }\n toPositionAnchor(options = {}) {\n const text = this.root.textContent;\n const match = matchQuote(text, this.exact, Object.assign(Object.assign({}, this.context), { hint: options.hint }));\n if (!match) {\n throw new Error(\"Quote not found\");\n }\n return new TextPositionAnchor(this.root, match.start, match.end);\n }\n}\n/**\n * Parse a string containing a time offset in seconds, since the start of some\n * media, into a float.\n */\nfunction parseMediaTime(timeStr) {\n const val = parseFloat(timeStr);\n if (!Number.isFinite(val) || val < 0) {\n return null;\n }\n return val;\n}\n/** Implementation of {@link Array.prototype.findLastIndex} */\nfunction findLastIndex(ary, pred) {\n for (let i = ary.length - 1; i >= 0; i--) {\n if (pred(ary[i])) {\n return i;\n }\n }\n return -1;\n}\nfunction closestElement(node) {\n return node instanceof Element ? node : node.parentElement;\n}\n/**\n * Get the media time range associated with an element or pair of elements,\n * from `data-time-{start, end}` attributes on them.\n */\nfunction getMediaTimeRange(start, end = start) {\n var _a, _b;\n const startTime = parseMediaTime((_a = start === null || start === void 0 ? void 0 : start.getAttribute(\"data-time-start\")) !== null && _a !== void 0 ? _a : \"\");\n const endTime = parseMediaTime((_b = end === null || end === void 0 ? void 0 : end.getAttribute(\"data-time-end\")) !== null && _b !== void 0 ? _b : \"\");\n if (typeof startTime !== \"number\" ||\n typeof endTime !== \"number\" ||\n endTime < startTime) {\n return null;\n }\n return [startTime, endTime];\n}\nexport class MediaTimeAnchor {\n constructor(root, start, end) {\n this.root = root;\n this.start = start;\n this.end = end;\n }\n /**\n * Return a {@link MediaTimeAnchor} that represents a range, or `null` if\n * no time range information is present on elements in the range.\n */\n static fromRange(root, range) {\n var _a, _b;\n const start = (_a = closestElement(range.startContainer)) === null || _a === void 0 ? void 0 : _a.closest(\"[data-time-start]\");\n const end = (_b = closestElement(range.endContainer)) === null || _b === void 0 ? void 0 : _b.closest(\"[data-time-end]\");\n const timeRange = getMediaTimeRange(start, end);\n if (!timeRange) {\n return null;\n }\n const [startTime, endTime] = timeRange;\n return new MediaTimeAnchor(root, startTime, endTime);\n }\n /**\n * Convert this anchor to a DOM range.\n *\n * This returned range will start from the beginning of the element whose\n * associated time range includes `start` and continue to the end of the\n * element whose associated time range includes `end`.\n */\n toRange() {\n const segments = [...this.root.querySelectorAll(\"[data-time-start]\")]\n .map((element) => {\n const timeRange = getMediaTimeRange(element);\n if (!timeRange) {\n return null;\n }\n const [start, end] = timeRange;\n return { element, start, end };\n })\n .filter((s) => s !== null);\n segments.sort((a, b) => a.start - b.start);\n const startIdx = findLastIndex(segments, (s) => s.start <= this.start && s.end >= this.start);\n if (startIdx === -1) {\n throw new Error(\"Start segment not found\");\n }\n const endIdx = startIdx +\n segments\n .slice(startIdx)\n .findIndex((s) => s.start <= this.end && s.end >= this.end);\n if (endIdx === -1) {\n throw new Error(\"End segment not found\");\n }\n const range = new Range();\n range.setStart(segments[startIdx].element, 0);\n const endEl = segments[endIdx].element;\n range.setEnd(endEl, endEl.childNodes.length);\n return range;\n }\n static fromSelector(root, selector) {\n const { start, end } = selector;\n return new MediaTimeAnchor(root, start, end);\n }\n toSelector() {\n return {\n type: \"MediaTimeSelector\",\n start: this.start,\n end: this.end,\n };\n }\n}\n","import { log } from \"../util/log\";\nimport { getClientRectsNoOverlap, dezoomDomRect, dezoomRect, rectContainsPoint, domRectToRect, } from \"../util/rect\";\nimport { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nexport class DecorationManager {\n constructor(window) {\n this.styles = new Map();\n this.groups = new Map();\n this.lastGroupId = 0;\n this.window = window;\n // Relayout all the decorations when the document body is resized.\n window.addEventListener(\"load\", () => {\n const body = window.document.body;\n let lastSize = { width: 0, height: 0 };\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n if (lastSize.width === body.clientWidth &&\n lastSize.height === body.clientHeight) {\n return;\n }\n lastSize = {\n width: body.clientWidth,\n height: body.clientHeight,\n };\n this.relayoutDecorations();\n });\n });\n observer.observe(body);\n }, false);\n }\n registerTemplates(templates) {\n let stylesheet = \"\";\n for (const [id, template] of templates) {\n this.styles.set(id, template);\n if (template.stylesheet) {\n stylesheet += template.stylesheet + \"\\n\";\n }\n }\n if (stylesheet) {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = stylesheet;\n document.getElementsByTagName(\"head\")[0].appendChild(styleElement);\n }\n }\n addDecoration(decoration, groupName) {\n console.log(`addDecoration ${decoration.id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.add(decoration);\n }\n removeDecoration(id, groupName) {\n console.log(`removeDecoration ${id} ${groupName}`);\n const group = this.getGroup(groupName);\n group.remove(id);\n }\n relayoutDecorations() {\n console.log(\"relayoutDecorations\");\n for (const group of this.groups.values()) {\n group.relayout();\n }\n }\n getGroup(name) {\n let group = this.groups.get(name);\n if (!group) {\n const id = \"readium-decoration-\" + this.lastGroupId++;\n group = new DecorationGroup(id, name, this.styles);\n this.groups.set(name, group);\n }\n return group;\n }\n /**\n * Handles click events on a Decoration.\n * Returns whether a decoration matched this event.\n */\n handleDecorationClickEvent(event) {\n if (this.groups.size === 0) {\n return null;\n }\n const findTarget = () => {\n for (const [group, groupContent] of this.groups) {\n for (const item of groupContent.items.reverse()) {\n if (!item.clickableElements) {\n continue;\n }\n for (const element of item.clickableElements) {\n const rect = domRectToRect(element.getBoundingClientRect());\n if (rectContainsPoint(rect, event.clientX, event.clientY, 1)) {\n return { group, item, element };\n }\n }\n }\n }\n };\n const target = findTarget();\n if (!target) {\n return null;\n }\n return {\n id: target.item.decoration.id,\n group: target.group,\n rect: domRectToRect(target.item.range.getBoundingClientRect()),\n event: event,\n };\n }\n}\nclass DecorationGroup {\n constructor(id, name, styles) {\n this.items = [];\n this.lastItemId = 0;\n this.container = null;\n this.groupId = id;\n this.groupName = name;\n this.styles = styles;\n }\n add(decoration) {\n const id = this.groupId + \"-\" + this.lastItemId++;\n const range = rangeFromDecorationTarget(decoration.cssSelector, decoration.textQuote);\n log(`range ${range}`);\n if (!range) {\n log(\"Can't locate DOM range for decoration\", decoration);\n return;\n }\n const item = {\n id,\n decoration,\n range,\n container: null,\n clickableElements: null,\n };\n this.items.push(item);\n this.layout(item);\n }\n remove(id) {\n const index = this.items.findIndex((it) => it.decoration.id === id);\n if (index === -1) {\n return;\n }\n const item = this.items[index];\n this.items.splice(index, 1);\n item.clickableElements = null;\n if (item.container) {\n item.container.remove();\n item.container = null;\n }\n }\n relayout() {\n this.clearContainer();\n for (const item of this.items) {\n this.layout(item);\n }\n }\n /**\n * Returns the group container element, after making sure it exists.\n */\n requireContainer() {\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.id = this.groupId;\n this.container.dataset.group = this.groupName;\n this.container.style.pointerEvents = \"none\";\n document.body.append(this.container);\n }\n return this.container;\n }\n /**\n * Removes the group container.\n */\n clearContainer() {\n if (this.container) {\n this.container.remove();\n this.container = null;\n }\n }\n /**\n * Layouts a single Decoration item.\n */\n layout(item) {\n log(`layout ${item}`);\n const groupContainer = this.requireContainer();\n const unsafeStyle = this.styles.get(item.decoration.style);\n if (!unsafeStyle) {\n console.log(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n const style = unsafeStyle;\n const itemContainer = document.createElement(\"div\");\n itemContainer.id = item.id;\n itemContainer.dataset.style = item.decoration.style;\n itemContainer.style.pointerEvents = \"none\";\n const documentWritingMode = getDocumentWritingMode();\n const isVertical = documentWritingMode === \"vertical-rl\" ||\n documentWritingMode === \"vertical-lr\";\n const zoom = groupContainer.currentCSSZoom;\n const scrollingElement = document.scrollingElement;\n const xOffset = scrollingElement.scrollLeft / zoom;\n const yOffset = scrollingElement.scrollTop / zoom;\n const viewportWidth = isVertical ? window.innerHeight : window.innerWidth;\n const viewportHeight = isVertical ? window.innerWidth : window.innerHeight;\n const columnCount = parseInt(getComputedStyle(document.documentElement).getPropertyValue(\"column-count\")) || 1;\n const pageSize = (isVertical ? viewportHeight : viewportWidth) / columnCount;\n function positionElement(element, rect, boundingRect, writingMode) {\n element.style.position = \"absolute\";\n const isVerticalRL = writingMode === \"vertical-rl\";\n const isVerticalLR = writingMode === \"vertical-lr\";\n if (isVerticalRL || isVerticalLR) {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${viewportWidth}px`;\n const top = Math.floor(rect.top / viewportWidth) * viewportWidth;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.height}px`;\n element.style.height = `${viewportWidth}px`;\n if (isVerticalRL) {\n element.style.right = `${-boundingRect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${boundingRect.left + xOffset}px`;\n }\n element.style.top = `${boundingRect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${rect.height}px`;\n element.style.height = `${pageSize}px`;\n const top = Math.floor(rect.top / pageSize) * pageSize;\n if (isVerticalRL) {\n element.style.right = `${-rect.right - xOffset + scrollingElement.clientWidth}px`;\n }\n else {\n // vertical-lr\n element.style.left = `${rect.left + xOffset}px`;\n }\n element.style.top = `${top + yOffset}px`;\n }\n }\n else {\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n else if (style.width === \"page\") {\n element.style.width = `${pageSize}px`;\n element.style.height = `${rect.height}px`;\n const left = Math.floor(rect.left / pageSize) * pageSize;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n }\n const rawBoundingRect = item.range.getBoundingClientRect();\n const boundingRect = dezoomDomRect(rawBoundingRect, zoom);\n let elementTemplate;\n try {\n const template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n }\n catch (error) {\n let message;\n if (\"message\" in error) {\n message = error.message;\n }\n else {\n message = null;\n }\n console.log(`Invalid decoration element \"${item.decoration.element}\": ${message}`);\n return;\n }\n if (style.layout === \"boxes\") {\n const doNotMergeHorizontallyAlignedRects = !documentWritingMode.startsWith(\"vertical\");\n const startElement = getContainingElement(item.range.startContainer);\n // Decorated text may have a different writingMode from document body\n const decoratorWritingMode = getComputedStyle(startElement).writingMode;\n const clientRects = getClientRectsNoOverlap(item.range, doNotMergeHorizontallyAlignedRects)\n .map((rect) => {\n return dezoomRect(rect, zoom);\n })\n .sort((r1, r2) => {\n if (r1.top !== r2.top)\n return r1.top - r2.top;\n if (decoratorWritingMode === \"vertical-rl\") {\n return r2.left - r1.left;\n }\n else if (decoratorWritingMode === \"vertical-lr\") {\n return r1.left - r2.left;\n }\n else {\n return r1.left - r2.left;\n }\n });\n for (const clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.pointerEvents = \"none\";\n line.dataset.writingMode = decoratorWritingMode;\n positionElement(line, clientRect, boundingRect, documentWritingMode);\n itemContainer.append(line);\n }\n }\n else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.pointerEvents = \"none\";\n bounds.dataset.writingMode = documentWritingMode;\n positionElement(bounds, boundingRect, boundingRect, documentWritingMode);\n itemContainer.append(bounds);\n }\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(itemContainer.querySelectorAll(\"[data-activable='1']\"));\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }\n}\n/**\n * Returns the document body's writing mode.\n */\nfunction getDocumentWritingMode() {\n return getComputedStyle(document.body).writingMode;\n}\n/**\n * Returns the closest element ancestor of the given node.\n */\nfunction getContainingElement(node) {\n return node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n}\n/*\n * Compute DOM range from decoration target.\n */\nexport function rangeFromDecorationTarget(cssSelector, textQuote) {\n let root;\n if (cssSelector) {\n try {\n root = document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n }\n if (!root && !textQuote) {\n return null;\n }\n else if (!root) {\n root = document.body;\n }\n if (textQuote) {\n const anchor = new TextQuoteAnchor(root, textQuote.quotedText, {\n prefix: textQuote.textBefore,\n suffix: textQuote.textAfter,\n });\n try {\n return anchor.toRange();\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n else {\n const range = document.createRange();\n range.setStartBefore(root);\n range.setEndAfter(root);\n return range;\n }\n}\n","export class GesturesDetector {\n constructor(window, listener, decorationManager) {\n this.window = window;\n this.listener = listener;\n this.decorationManager = decorationManager;\n document.addEventListener(\"click\", (event) => {\n this.onClick(event);\n }, false);\n }\n onClick(event) {\n if (event.defaultPrevented) {\n return;\n }\n let nearestElement;\n if (event.target instanceof HTMLElement) {\n nearestElement = this.nearestInteractiveElement(event.target);\n }\n else {\n nearestElement = null;\n }\n if (nearestElement) {\n if (nearestElement instanceof HTMLAnchorElement) {\n this.listener.onLinkActivated(nearestElement.href, nearestElement.outerHTML);\n event.stopPropagation();\n event.preventDefault();\n }\n return;\n }\n let decorationActivatedEvent;\n if (this.decorationManager) {\n decorationActivatedEvent =\n this.decorationManager.handleDecorationClickEvent(event);\n }\n else {\n decorationActivatedEvent = null;\n }\n if (decorationActivatedEvent) {\n this.listener.onDecorationActivated(decorationActivatedEvent);\n }\n else {\n this.listener.onTap(event);\n }\n // event.stopPropagation()\n // event.preventDefault()\n }\n // See. https://github.com/JayPanoz/architecture/tree/touch-handling/misc/touch-handling\n nearestInteractiveElement(element) {\n if (element == null) {\n return null;\n }\n const interactiveTags = [\n \"a\",\n \"audio\",\n \"button\",\n \"canvas\",\n \"details\",\n \"input\",\n \"label\",\n \"option\",\n \"select\",\n \"submit\",\n \"textarea\",\n \"video\",\n ];\n if (interactiveTags.indexOf(element.nodeName.toLowerCase()) != -1) {\n return element;\n }\n // Checks whether the element is editable by the user.\n if (element.hasAttribute(\"contenteditable\") &&\n element.getAttribute(\"contenteditable\").toLowerCase() != \"false\") {\n return element;\n }\n // Checks parents recursively because the touch might be for example on an inside a .\n if (element.parentElement) {\n return this.nearestInteractiveElement(element.parentElement);\n }\n return null;\n }\n}\n","//\n// Copyright 2021 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { dezoomRect, domRectToRect } from \"../util/rect\";\nimport { log } from \"../util/log\";\nimport { TextRange } from \"../vendor/hypothesis/annotator/anchoring/text-range\";\n// Polyfill for Android API 26\nimport matchAll from \"string.prototype.matchall\";\nimport { rectToParentCoordinates } from \"./geometry\";\nmatchAll.shim();\nexport class SelectionReporter {\n constructor(window, listener) {\n this.isSelecting = false;\n document.addEventListener(\"selectionchange\", \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (event) => {\n var _a;\n const collapsed = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.isCollapsed;\n if (collapsed && this.isSelecting) {\n this.isSelecting = false;\n listener.onSelectionEnd();\n }\n else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true;\n listener.onSelectionStart();\n }\n }, false);\n }\n}\nexport function selectionToParentCoordinates(selection, iframe) {\n const boundingRect = iframe.getBoundingClientRect();\n const shiftedRect = rectToParentCoordinates(selection.selectionRect, boundingRect);\n return {\n selectedText: selection === null || selection === void 0 ? void 0 : selection.selectedText,\n selectionRect: shiftedRect,\n textBefore: selection.textBefore,\n textAfter: selection.textAfter,\n };\n}\nexport class SelectionManager {\n constructor(window) {\n this.isSelecting = false;\n //, listener: SelectionListener) {\n this.window = window;\n /*this.listener = listener\n document.addEventListener(\n \"selectionchange\",\n () => {\n const selection = window.getSelection()!\n const collapsed = selection.isCollapsed\n \n if (collapsed && this.isSelecting) {\n this.isSelecting = false\n this.listener.onSelectionEnd()\n } else if (!collapsed && !this.isSelecting) {\n this.isSelecting = true\n this.listener.onSelectionStart()\n }\n },\n false\n )*/\n }\n clearSelection() {\n var _a;\n (_a = this.window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();\n }\n getCurrentSelection() {\n const text = this.getCurrentSelectionText();\n if (!text) {\n return null;\n }\n const rect = this.getSelectionRect();\n return {\n selectedText: text.highlight,\n textBefore: text.before,\n textAfter: text.after,\n selectionRect: rect,\n };\n }\n getSelectionRect() {\n try {\n const selection = this.window.getSelection();\n const range = selection.getRangeAt(0);\n const zoom = this.window.document.body.currentCSSZoom;\n return dezoomRect(domRectToRect(range.getBoundingClientRect()), zoom);\n }\n catch (e) {\n log(e);\n throw e;\n //return null\n }\n }\n getCurrentSelectionText() {\n const selection = this.window.getSelection();\n if (selection.isCollapsed) {\n return undefined;\n }\n const highlight = selection.toString();\n const cleanHighlight = highlight\n .trim()\n .replace(/\\n/g, \" \")\n .replace(/\\s\\s+/g, \" \");\n if (cleanHighlight.length === 0) {\n return undefined;\n }\n if (!selection.anchorNode || !selection.focusNode) {\n return undefined;\n }\n const range = selection.rangeCount === 1\n ? selection.getRangeAt(0)\n : createOrderedRange(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n if (!range || range.collapsed) {\n log(\"$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!\");\n return undefined;\n }\n const text = document.body.textContent;\n const textRange = TextRange.fromRange(range).relativeTo(document.body);\n const start = textRange.start.offset;\n const end = textRange.end.offset;\n const snippetLength = 200;\n // Compute the text before the highlight, ignoring the first \"word\", which might be cut.\n let before = text.slice(Math.max(0, start - snippetLength), start);\n const firstWordStart = before.search(/\\P{L}\\p{L}/gu);\n if (firstWordStart !== -1) {\n before = before.slice(firstWordStart + 1);\n }\n // Compute the text after the highlight, ignoring the last \"word\", which might be cut.\n let after = text.slice(end, Math.min(text.length, end + snippetLength));\n const lastWordEnd = Array.from(after.matchAll(/\\p{L}\\P{L}/gu)).pop();\n if (lastWordEnd !== undefined && lastWordEnd.index > 1) {\n after = after.slice(0, lastWordEnd.index + 1);\n }\n return { highlight, before, after };\n }\n}\nfunction createOrderedRange(startNode, startOffset, endNode, endOffset) {\n const range = new Range();\n range.setStart(startNode, startOffset);\n range.setEnd(endNode, endOffset);\n if (!range.collapsed) {\n return range;\n }\n log(\">>> createOrderedRange COLLAPSED ... RANGE REVERSE?\");\n const rangeReverse = new Range();\n rangeReverse.setStart(endNode, endOffset);\n rangeReverse.setEnd(startNode, startOffset);\n if (!rangeReverse.collapsed) {\n log(\">>> createOrderedRange RANGE REVERSE OK.\");\n return range;\n }\n log(\">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!\");\n return undefined;\n}\n/*\nexport function convertRangeInfo(document: Document, rangeInfo) {\n const startElement = document.querySelector(\n rangeInfo.startContainerElementCssSelector\n );\n if (!startElement) {\n log(\"^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let startContainer = startElement;\n if (rangeInfo.startContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.startContainerChildTextNodeIndex >=\n startElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!\"\n );\n return undefined;\n }\n startContainer =\n startElement.childNodes[rangeInfo.startContainerChildTextNodeIndex];\n if (startContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n const endElement = document.querySelector(\n rangeInfo.endContainerElementCssSelector\n );\n if (!endElement) {\n log(\"^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!\");\n return undefined;\n }\n let endContainer = endElement;\n if (rangeInfo.endContainerChildTextNodeIndex >= 0) {\n if (\n rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length\n ) {\n log(\n \"^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!\"\n );\n return undefined;\n }\n endContainer =\n endElement.childNodes[rangeInfo.endContainerChildTextNodeIndex];\n if (endContainer.nodeType !== Node.TEXT_NODE) {\n log(\"^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!\");\n return undefined;\n }\n }\n return createOrderedRange(\n startContainer,\n rangeInfo.startOffset,\n endContainer,\n rangeInfo.endOffset\n );\n}\n\nexport function location2RangeInfo(location) {\n const locations = location.locations;\n const domRange = locations.domRange;\n const start = domRange.start;\n const end = domRange.end;\n\n return {\n endContainerChildTextNodeIndex: end.textNodeIndex,\n endContainerElementCssSelector: end.cssSelector,\n endOffset: end.offset,\n startContainerChildTextNodeIndex: start.textNodeIndex,\n startContainerElementCssSelector: start.cssSelector,\n startOffset: start.offset,\n };\n}\n*/\n","import { DecorationWrapperParentSide } from \"../fixed/decoration-wrapper\";\nexport class ReflowableDecorationsBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n registerTemplates(templates) {\n const templatesAsMap = parseTemplates(templates);\n this.manager.registerTemplates(templatesAsMap);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.manager.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.manager.removeDecoration(id, group);\n }\n}\nexport class FixedSingleDecorationsBridge {\n constructor() {\n this.wrapper = new DecorationWrapperParentSide();\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.wrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, group) {\n const actualDecoration = parseDecoration(decoration);\n this.wrapper.addDecoration(actualDecoration, group);\n }\n removeDecoration(id, group) {\n this.wrapper.removeDecoration(id, group);\n }\n}\nexport class FixedDoubleDecorationsBridge {\n constructor() {\n this.leftWrapper = new DecorationWrapperParentSide();\n this.rightWrapper = new DecorationWrapperParentSide();\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n }\n registerTemplates(templates) {\n const actualTemplates = parseTemplates(templates);\n this.leftWrapper.registerTemplates(actualTemplates);\n this.rightWrapper.registerTemplates(actualTemplates);\n }\n addDecoration(decoration, iframe, group) {\n const actualDecoration = parseDecoration(decoration);\n switch (iframe) {\n case \"left\":\n this.leftWrapper.addDecoration(actualDecoration, group);\n break;\n case \"right\":\n this.rightWrapper.addDecoration(actualDecoration, group);\n break;\n default:\n throw Error(`Unknown iframe type: ${iframe}`);\n }\n }\n removeDecoration(id, group) {\n this.leftWrapper.removeDecoration(id, group);\n this.rightWrapper.removeDecoration(id, group);\n }\n}\nfunction parseTemplates(templates) {\n return new Map(Object.entries(JSON.parse(templates)));\n}\nfunction parseDecoration(decoration) {\n const jsonDecoration = JSON.parse(decoration);\n return jsonDecoration;\n}\n","export class ReflowableListenerAdapter {\n constructor(gesturesBridge, selectionListenerBridge) {\n this.gesturesBridge = gesturesBridge;\n this.selectionListenerBridge = selectionListenerBridge;\n }\n onTap(event) {\n const tapEvent = {\n x: (event.clientX - visualViewport.offsetLeft) * visualViewport.scale,\n y: (event.clientY - visualViewport.offsetTop) * visualViewport.scale,\n };\n const stringEvent = JSON.stringify(tapEvent);\n this.gesturesBridge.onTap(stringEvent);\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesBridge.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const offset = {\n x: (event.event.clientX - visualViewport.offsetLeft) *\n visualViewport.scale,\n y: (event.event.clientY - visualViewport.offsetTop) *\n visualViewport.scale,\n };\n const stringOffset = JSON.stringify(offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesBridge.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onSelectionStart() {\n this.selectionListenerBridge.onSelectionStart();\n }\n onSelectionEnd() {\n this.selectionListenerBridge.onSelectionEnd();\n }\n}\nexport class FixedListenerAdapter {\n constructor(window, gesturesApi, documentApi) {\n this.window = window;\n this.gesturesApi = gesturesApi;\n this.documentApi = documentApi;\n this.resizeObserverAdded = false;\n this.documentLoadedFired = false;\n }\n onTap(event) {\n this.gesturesApi.onTap(JSON.stringify(event.offset));\n }\n onLinkActivated(href, outerHtml) {\n this.gesturesApi.onLinkActivated(href, outerHtml);\n }\n onDecorationActivated(event) {\n const stringOffset = JSON.stringify(event.offset);\n const stringRect = JSON.stringify(event.rect);\n this.gesturesApi.onDecorationActivated(event.id, event.group, stringRect, stringOffset);\n }\n onLayout() {\n if (!this.resizeObserverAdded) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => {\n const scrollingElement = this.window.document.scrollingElement;\n if (!this.documentLoadedFired &&\n (scrollingElement == null ||\n scrollingElement.scrollHeight > 0 ||\n scrollingElement.scrollWidth > 0)) {\n this.documentApi.onDocumentLoadedAndSized();\n this.documentLoadedFired = true;\n }\n else {\n this.documentApi.onDocumentResized();\n }\n });\n });\n observer.observe(this.window.document.body);\n }\n this.resizeObserverAdded = true;\n }\n}\n","import { selectionToParentCoordinates, } from \"../common/selection\";\nimport { SelectionWrapperParentSide } from \"../fixed/selection-wrapper\";\nexport class ReflowableSelectionBridge {\n constructor(window, manager) {\n this.window = window;\n this.manager = manager;\n }\n getCurrentSelection() {\n return this.manager.getCurrentSelection();\n }\n clearSelection() {\n this.manager.clearSelection();\n }\n}\nexport class FixedSingleSelectionBridge {\n constructor(iframe, listener) {\n this.iframe = iframe;\n this.listener = listener;\n const wrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n let adjustedSelection;\n if (selection) {\n adjustedSelection = selectionToParentCoordinates(selection, this.iframe);\n }\n else {\n adjustedSelection = selection;\n }\n const selectionAsJson = JSON.stringify(adjustedSelection);\n this.listener.onSelectionAvailable(requestId, selectionAsJson);\n },\n };\n this.wrapper = new SelectionWrapperParentSide(wrapperListener);\n }\n setMessagePort(messagePort) {\n this.wrapper.setMessagePort(messagePort);\n }\n requestSelection(requestId) {\n this.wrapper.requestSelection(requestId);\n }\n clearSelection() {\n this.wrapper.clearSelection();\n }\n}\nexport class FixedDoubleSelectionBridge {\n constructor(leftIframe, rightIframe, listener) {\n this.requestStates = new Map();\n this.isLeftInitialized = false;\n this.isRightInitialized = false;\n this.leftIframe = leftIframe;\n this.rightIframe = rightIframe;\n this.listener = listener;\n const leftWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.leftIframe);\n this.onSelectionAvailable(requestId, \"left\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"left\", selection);\n }\n },\n };\n this.leftWrapper = new SelectionWrapperParentSide(leftWrapperListener);\n const rightWrapperListener = {\n onSelectionAvailable: (requestId, selection) => {\n if (selection) {\n const resolvedSelection = selectionToParentCoordinates(selection, this.rightIframe);\n this.onSelectionAvailable(requestId, \"right\", resolvedSelection);\n }\n else {\n this.onSelectionAvailable(requestId, \"right\", selection);\n }\n },\n };\n this.rightWrapper = new SelectionWrapperParentSide(rightWrapperListener);\n }\n setLeftMessagePort(messagePort) {\n this.leftWrapper.setMessagePort(messagePort);\n this.isLeftInitialized = true;\n }\n setRightMessagePort(messagePort) {\n this.rightWrapper.setMessagePort(messagePort);\n this.isRightInitialized = true;\n }\n requestSelection(requestId) {\n if (this.isLeftInitialized && this.isRightInitialized) {\n this.requestStates.set(requestId, \"pending\");\n this.leftWrapper.requestSelection(requestId);\n this.rightWrapper.requestSelection(requestId);\n }\n else if (this.isLeftInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.leftWrapper.requestSelection(requestId);\n }\n else if (this.isRightInitialized) {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.rightWrapper.requestSelection(requestId);\n }\n else {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n this.onSelectionAvailable(requestId, \"left\", null);\n }\n }\n clearSelection() {\n this.leftWrapper.clearSelection();\n this.rightWrapper.clearSelection();\n }\n onSelectionAvailable(requestId, iframe, selection) {\n const requestState = this.requestStates.get(requestId);\n if (!requestState) {\n return;\n }\n if (!selection && requestState === \"pending\") {\n this.requestStates.set(requestId, \"firstResponseWasNull\");\n return;\n }\n this.requestStates.delete(requestId);\n const selectionAsJson = JSON.stringify(selection);\n this.listener.onSelectionAvailable(requestId, iframe, selectionAsJson);\n }\n}\n","export class CssBridge {\n constructor(document) {\n this.document = document;\n }\n setProperties(properties) {\n for (const [key, value] of properties) {\n this.setProperty(key, value);\n }\n }\n // For setting user setting.\n setProperty(key, value) {\n if (value === null || value === \"\") {\n this.removeProperty(key);\n }\n else {\n const root = document.documentElement;\n // The `!important` annotation is added with `setProperty()` because if it's part of the\n // `value`, it will be ignored by the Web View.\n root.style.setProperty(key, value, \"important\");\n }\n }\n // For removing user setting.\n removeProperty(key) {\n const root = document.documentElement;\n root.style.removeProperty(key);\n }\n}\n","import { TextQuoteAnchor } from \"../vendor/hypothesis/annotator/anchoring/types\";\nimport { log } from \"../util/log\";\nexport class ReflowableMoveBridge {\n constructor(document) {\n this.document = document;\n }\n getOffsetForLocation(location, vertical) {\n var _a, _b;\n const actualLocation = parseLocation(location);\n if (actualLocation.textAfter || actualLocation.textBefore) {\n return this.getOffsetForTextAnchor((_a = actualLocation.textBefore) !== null && _a !== void 0 ? _a : \"\", (_b = actualLocation.textAfter) !== null && _b !== void 0 ? _b : \"\", vertical);\n }\n if (actualLocation.cssSelector) {\n return this.getOffsetForCssSelector(actualLocation.cssSelector, vertical);\n }\n if (actualLocation.htmlId) {\n return this.getOffsetForHtmlId(actualLocation.htmlId, vertical);\n }\n return null;\n }\n getOffsetForTextAnchor(textBefore, textAfter, vertical) {\n const root = this.document.body;\n const anchor = new TextQuoteAnchor(root, \"\", {\n prefix: textBefore,\n suffix: textAfter,\n });\n try {\n const range = anchor.toRange();\n return this.getOffsetForRect(range.getBoundingClientRect(), vertical);\n }\n catch (e) {\n log(e);\n return null;\n }\n }\n getOffsetForCssSelector(cssSelector, vertical) {\n let element;\n try {\n element = this.document.querySelector(cssSelector);\n }\n catch (e) {\n log(e);\n }\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForHtmlId(htmlId, vertical) {\n const element = this.document.getElementById(htmlId);\n if (!element) {\n return null;\n }\n return this.getOffsetForElement(element, vertical);\n }\n getOffsetForElement(element, vertical) {\n const rect = element.getBoundingClientRect();\n return this.getOffsetForRect(rect, vertical);\n }\n getOffsetForRect(rect, vertical) {\n if (vertical) {\n return rect.top + window.scrollY;\n }\n else {\n const offset = rect.left + window.scrollX;\n return offset;\n }\n }\n}\nfunction parseLocation(location) {\n const jsonLocation = JSON.parse(location);\n return jsonLocation;\n}\n","//\n// Copyright 2024 Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//\nimport { ReflowableInitializationBridge as ReflowableInitializer, } from \"./bridge/reflowable-initialization-bridge\";\nimport { appendVirtualColumnIfNeeded } from \"./util/columns\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nwindow.addEventListener(\"load\", (event) => {\n let documentLoadedFired = false;\n const observer = new ResizeObserver(() => {\n let colCountFixed = false;\n requestAnimationFrame(() => {\n const scrollingElement = window.document.scrollingElement;\n const scrollingElementEmpty = scrollingElement == null ||\n (scrollingElement.scrollHeight == 0 &&\n scrollingElement.scrollWidth == 0);\n if (!documentLoadedFired && scrollingElementEmpty) {\n // Document is not sized yet\n return;\n }\n if (!colCountFixed && !scrollingElementEmpty) {\n const colChanged = appendVirtualColumnIfNeeded(window);\n colCountFixed = true;\n if (colChanged) {\n // Column number has changed, wait for next resize callback.\n return;\n }\n }\n colCountFixed = false;\n if (!documentLoadedFired) {\n window.documentState.onDocumentLoadedAndSized();\n documentLoadedFired = true;\n }\n else {\n window.documentState.onDocumentResized();\n }\n });\n });\n observer.observe(document.body);\n});\nnew ReflowableInitializer(window, window.reflowableApiState);\n","/**\n * In paginated mode, the width of each resource must be a multiple of the viewport size\n * for proper snapping. This may not be automatically the case if the number of\n * columns in the resource is not a multiple of the number of columns displayed in the viewport.\n * To fix this, we insert a blank virtual column at the end of the resource.\n *\n * Returns if the column number has changed.\n */\nexport function appendVirtualColumnIfNeeded(wnd) {\n const colCountPerScreen = getColumnCountPerScreen(wnd);\n if (!colCountPerScreen) {\n // scroll mode\n return false;\n }\n const virtualCols = wnd.document.querySelectorAll(\"div[id^='readium-virtual-page']\");\n const virtualColsCount = virtualCols.length;\n // Remove first so that we don’t end up with an incorrect scrollWidth\n // Even when removing their width we risk having an incorrect scrollWidth\n // so removing them entirely is the most robust solution\n for (const virtualCol of virtualCols) {\n virtualCol.remove();\n }\n const documentWidth = wnd.document.scrollingElement.scrollWidth;\n const windowWidth = wnd.visualViewport.width;\n const totalColCount = Math.round((documentWidth / windowWidth) * colCountPerScreen);\n const lonelyColCount = totalColCount % colCountPerScreen;\n const needed = colCountPerScreen === 1 || lonelyColCount === 0\n ? 0\n : colCountPerScreen - lonelyColCount;\n if (needed > 0) {\n for (let i = 0; i < needed; i++) {\n const virtualCol = wnd.document.createElement(\"div\");\n virtualCol.setAttribute(\"id\", `readium-virtual-page-${i}`);\n virtualCol.dataset.readium = \"true\";\n virtualCol.style.breakBefore = \"column\";\n virtualCol.innerHTML = \"​\"; // zero-width space\n wnd.document.body.appendChild(virtualCol);\n }\n }\n return virtualColsCount != needed;\n}\nfunction getColumnCountPerScreen(wnd) {\n return parseInt(wnd\n .getComputedStyle(wnd.document.documentElement)\n .getPropertyValue(\"column-count\"));\n}\n","import { DecorationManager } from \"../common/decoration\";\nimport { GesturesDetector } from \"../common/gestures\";\nimport { SelectionManager, SelectionReporter } from \"../common/selection\";\nimport { ReflowableDecorationsBridge } from \"./all-decoration-bridge\";\nimport { ReflowableListenerAdapter } from \"./all-listener-bridge\";\nimport { ReflowableSelectionBridge } from \"./all-selection-bridge\";\nimport { CssBridge } from \"./reflowable-css-bridge\";\nimport { ReflowableMoveBridge } from \"./reflowable-move-bridge\";\nexport class ReflowableInitializationBridge {\n constructor(window, listener) {\n this.window = window;\n this.listener = listener;\n this.setupViewport();\n this.initApis();\n }\n initApis() {\n this.window.move = new ReflowableMoveBridge(this.window.document);\n this.listener.onMoveApiAvailable();\n const bridgeListener = new ReflowableListenerAdapter(window.gestures, window.selectionListener);\n const decorationManager = new DecorationManager(window);\n this.window.readiumcss = new CssBridge(window.document);\n this.listener.onCssApiAvailable();\n this.window.selection = new ReflowableSelectionBridge(window, new SelectionManager(window));\n this.listener.onSelectionApiAvailable();\n this.window.decorations = new ReflowableDecorationsBridge(window, decorationManager);\n this.listener.onDecorationApiAvailable();\n new GesturesDetector(window, bridgeListener, decorationManager);\n new SelectionReporter(window, bridgeListener);\n }\n // Setups the `viewport` meta tag to disable overview.\n setupViewport() {\n this.window.document.addEventListener(\"DOMContentLoaded\", () => {\n const meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\");\n this.window.document.head.appendChild(meta);\n });\n }\n}\n"],"names":["reverse","s","split","join","oneIfNotZero","n","advanceBlock","ctx","peq","b","hIn","pV","P","mV","M","hInIsNegative","eq","xV","xH","pH","mH","hOut","lastRowMask","findMatchEnds","text","pattern","maxErrors","length","Math","min","matches","w","bMax","ceil","Uint32Array","fill","emptyPeq","Map","asciiPeq","i","push","c","val","charCodeAt","has","charPeq","set","r","idx","y","max","score","j","charCode","get","carry","maxBlockScore","splice","start","end","errors","exports","patRev","map","m","minStart","slice","reduce","rm","findMatchStarts","GetIntrinsic","callBind","$indexOf","module","name","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","call","$gOPD","$defineProperty","$max","value","e","originalFunction","func","arguments","configurable","applyBind","apply","hasPropertyDescriptors","$SyntaxError","$TypeError","gopd","obj","property","nonEnumerable","nonWritable","nonConfigurable","loose","desc","enumerable","writable","keys","hasSymbols","Symbol","toStr","Object","prototype","toString","concat","Array","defineDataProperty","supportsDescriptors","defineProperty","object","predicate","fn","defineProperties","predicates","props","getOwnPropertySymbols","hasToStringTag","toStringTag","overrideIfSet","force","iterator","isPrimitive","isCallable","isDate","isSymbol","input","exoticToPrim","hint","String","Number","toPrimitive","O","TypeError","GetMethod","valueOf","result","method","methodNames","ordinaryToPrimitive","that","target","this","bound","args","boundLength","boundArgs","Function","Empty","implementation","functionsHaveNames","gOPD","getOwnPropertyDescriptor","functionsHaveConfigurableNames","$bind","boundFunctionsHaveNames","undefined","SyntaxError","$Function","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasProto","getProto","getPrototypeOf","x","__proto__","needsEval","TypedArray","Uint8Array","INTRINSICS","AggregateError","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","Error","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","isFinite","isNaN","JSON","parseFloat","parseInt","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","URIError","WeakMap","WeakRef","WeakSet","error","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","parts","string","first","last","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","test","foo","$Object","origSymbol","hasSymbolSham","sym","symObj","getOwnPropertyNames","syms","propertyIsEnumerable","descriptor","hasOwnProperty","channel","SLOT","assert","slot","slots","V","freeze","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","document","all","str","strClass","getDay","tryDateObject","isRegexMarker","badStringifier","callBound","throwRegexMarker","$toString","symToStr","symStringRegex","isSymbolObject","hasMap","mapSizeDescriptor","mapSize","mapForEach","forEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","toUpperCase","$toLowerCase","toLowerCase","$test","$join","$arrSlice","$floor","floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","isEnumerable","gPO","addNumericSeparator","num","Infinity","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","wrapQuotes","defaultStyle","opts","quoteChar","quoteStyle","isArray","isRegExp","inspect_","options","depth","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","base","prev","getIndent","indexOf","inspect","from","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","key","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","ys","isPlainObject","constructor","protoTag","stringTag","tag","l","remaining","trailer","lowbyte","type","size","entries","lineJoiner","isArr","symMap","k","keysShim","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","o","ctor","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","window","isObject","isFunction","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","shim","keysWorksWithArguments","callee","setFunctionName","hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky","define","getPolyfill","flagsBound","flags","calls","TypeErr","regex","polyfill","proto","isRegex","hasDescriptors","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","list","curr","next","$wm","$m","$o","objects","node","listGet","listHas","listSet","Call","Get","IsRegExp","ToString","RequireObjectCoercible","flagsGetter","regexpMatchAllPolyfill","getMatcher","regexp","matcherPolyfill","matchAll","matcher","S","rx","boundMatchAll","regexpMatchAll","CreateRegExpStringIterator","SpeciesConstructor","ToLength","Type","OrigRegExp","supportsConstructingWithFlags","regexMatchAll","R","tmp","C","source","constructRegexWithFlags","lastIndex","fullUnicode","defineP","symbol","mvsIsWS","leftWhitespace","rightWhitespace","boundMethod","receiver","trim","CodePointAt","isInteger","MAX_SAFE_INTEGER","index","IsArray","F","argumentsList","isLeadingSurrogate","isTrailingSurrogate","UTF16SurrogatePairToCodePoint","$charAt","$charCodeAt","position","cp","firstIsLeading","firstIsTrailing","second","done","DefineOwnProperty","FromPropertyDescriptor","IsDataDescriptor","IsPropertyKey","SameValue","IteratorPrototype","AdvanceStringIndex","CreateIterResultObject","CreateMethodProperty","OrdinaryObjectCreate","RegExpExec","setToStringTag","RegExpStringIterator","thisIndex","nextIndex","isPropertyDescriptor","IsAccessorDescriptor","ToPropertyDescriptor","Desc","assertRecord","fromPropertyDescriptor","GetV","IsCallable","$construct","DefinePropertyOrThrow","isConstructorMarker","argument","err","hasRegExpMatcher","ToBoolean","$ObjectCreate","additionalInternalSlotsList","T","regexExec","$isNaN","noThrowOnStrictViolation","Throw","$species","IsConstructor","defaultConstructor","$Number","$RegExp","$parseInteger","regexTester","isBinary","isOctal","isInvalidHexLiteral","hasNonWS","$trim","StringToNumber","NaN","trimmed","ToNumber","truncate","$isFinite","ToIntegerOrInfinity","len","ToPrimitive","Obj","getter","setter","$String","ES5Type","$fromCharCode","lead","trail","optMessage","$isEnumerable","$Array","allowed","isData","IsAccessor","then","recordType","argumentName","array","callback","$abs","absValue","record","a","ES","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","prop","debug","log","console","dezoomRect","rect","zoomLevel","bottom","height","left","right","top","width","domRectToRect","getClientRectsNoOverlap","range","doNotMergeHorizontallyAlignedRects","clientRects","getClientRects","originalRects","rangeClientRect","newRects","replaceOverlapingRects","rects","tolerance","rectsToKeep","possiblyContainingRect","rectContains","delete","removeContainedRects","mergeTouchingRects","rect1","rect2","rectsLineUpVertically","almostEqual","rectsLineUpHorizontally","rectsTouchOrOverlap","filter","replacementClientRect","getBoundingRect","rectContainsPoint","toRemove","toAdd","subtractRects1","rectSubtract","subtractRects2","rectIntersected","maxLeft","minRight","maxTop","minBottom","rectIntersect","rectA","rectB","rectC","rectD","abs","TrimDirection","ResolveDirection","search","matchPos","exactMatches","textMatchScore","closestNonSpaceInString","baseOffset","direction","nextChar","Forwards","charAt","availableChars","availableNonWhitespaceChars","Backwards","substring","trimEnd","trimStart","offsetDelta","closestNonSpaceInRange","nodeIter","commonAncestorContainer","ownerDocument","createNodeIterator","NodeFilter","SHOW_TEXT","initialBoundaryNode","startContainer","endContainer","terminalBoundaryNode","currentNode","nextNode","previousNode","trimmedOffset","advance","nodeText","textContent","offset","nodeTextLength","_a","_b","nodeType","Node","ELEMENT_NODE","TEXT_NODE","previousSiblingsTextLength","sibling","previousSibling","resolveOffsets","element","offsets","nextOffset","shift","results","textNode","data","relativeTo","parent","contains","el","parentElement","resolve","tw","createTreeWalker","getRootNode","forwards","FORWARDS","fromCharOffset","fromPoint","textOffset","toRange","BACKWARDS","Range","setStart","setEnd","fromRange","startOffset","endOffset","fromOffsets","root","trimmedRange","cloneRange","startTrimmed","endTrimmed","trimmedOffsets","trimRange","TextPositionAnchor","textRange","fromSelector","selector","toSelector","TextQuoteAnchor","exact","context","prefix","suffix","toPositionAnchor","scoreMatch","quoteScore","prefixScore","suffixScore","posScore","quoteWeight","scoredMatches","sort","matchQuote","assign","DecorationManager","styles","groups","lastGroupId","addEventListener","body","lastSize","ResizeObserver","requestAnimationFrame","clientWidth","clientHeight","relayoutDecorations","observe","registerTemplates","templates","stylesheet","id","template","styleElement","createElement","innerHTML","getElementsByTagName","appendChild","addDecoration","decoration","groupName","getGroup","add","removeDecoration","remove","group","values","relayout","DecorationGroup","handleDecorationClickEvent","event","groupContent","item","items","clickableElements","getBoundingClientRect","clientX","clientY","findTarget","lastItemId","container","groupId","cssSelector","textQuote","querySelector","createRange","setStartBefore","setEndAfter","anchor","quotedText","textBefore","textAfter","rangeFromDecorationTarget","layout","findIndex","it","clearContainer","requireContainer","dataset","style","pointerEvents","append","groupContainer","unsafeStyle","itemContainer","documentWritingMode","getComputedStyle","writingMode","isVertical","zoom","currentCSSZoom","scrollingElement","xOffset","scrollLeft","yOffset","scrollTop","viewportWidth","innerHeight","innerWidth","viewportHeight","columnCount","documentElement","getPropertyValue","pageSize","positionElement","boundingRect","isVerticalRL","DOMRect","elementTemplate","content","firstElementChild","message","startsWith","startElement","decoratorWritingMode","r1","r2","clientRect","line","cloneNode","bounds","querySelectorAll","children","GesturesDetector","listener","decorationManager","onClick","defaultPrevented","nearestElement","decorationActivatedEvent","nearestInteractiveElement","HTMLAnchorElement","onLinkActivated","href","outerHTML","stopPropagation","preventDefault","onDecorationActivated","onTap","hasAttribute","SelectionReporter","isSelecting","collapsed","getSelection","isCollapsed","onSelectionEnd","onSelectionStart","SelectionManager","clearSelection","removeAllRanges","getCurrentSelection","getCurrentSelectionText","getSelectionRect","selectedText","highlight","before","after","selectionRect","getRangeAt","selection","anchorNode","focusNode","rangeCount","startNode","endNode","rangeReverse","createOrderedRange","anchorOffset","focusOffset","firstWordStart","lastWordEnd","pop","ReflowableDecorationsBridge","manager","templatesAsMap","parse","parseTemplates","actualDecoration","parseDecoration","ReflowableListenerAdapter","gesturesBridge","selectionListenerBridge","tapEvent","visualViewport","offsetLeft","scale","offsetTop","stringEvent","stringify","outerHtml","stringOffset","stringRect","ReflowableSelectionBridge","CssBridge","setProperties","properties","setProperty","removeProperty","ReflowableMoveBridge","getOffsetForLocation","location","vertical","actualLocation","parseLocation","getOffsetForTextAnchor","getOffsetForCssSelector","htmlId","getOffsetForHtmlId","getOffsetForRect","getOffsetForElement","getElementById","scrollY","scrollX","documentLoadedFired","colCountFixed","scrollingElementEmpty","scrollHeight","scrollWidth","colChanged","wnd","colCountPerScreen","getColumnCountPerScreen","virtualCols","virtualColsCount","virtualCol","documentWidth","windowWidth","lonelyColCount","round","needed","setAttribute","readium","breakBefore","appendVirtualColumnIfNeeded","documentState","onDocumentResized","onDocumentLoadedAndSized","setupViewport","initApis","move","onMoveApiAvailable","bridgeListener","gestures","selectionListener","readiumcss","onCssApiAvailable","onSelectionApiAvailable","decorations","onDecorationApiAvailable","meta","head","reflowableApiState"],"sourceRoot":""} \ No newline at end of file diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt index 515845801c..918b3b64b2 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebRenditionState.kt @@ -23,13 +23,13 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.unit.DpSize -import kotlin.coroutines.suspendCoroutine import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentMapOf import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx.coroutines.withContext import org.readium.navigator.common.DecorationController import org.readium.navigator.common.HtmlId @@ -400,10 +400,20 @@ internal class ReflowableNavigationDelegate( val destLocation = location.toResourceLocation() val resourceLocations = publication.getResourceLocations(destIndex, destLocation) + fun cleanUp() { + resourceStates.zip(resourceLocations) + .forEach { (state, location) -> + state.cancelPendingLocation(location) + } + } + try { pagerState.scrollToPage(destIndex) - suspendCoroutine { continuation -> + suspendCancellableCoroutine { continuation -> + continuation.invokeOnCancellation { + cleanUp() + } resourceStates.zip(resourceLocations) .forEach { (state, location) -> state.go( @@ -413,10 +423,7 @@ internal class ReflowableNavigationDelegate( } } } catch (e: Exception) { // Mainly for CancellationException - resourceStates.zip(resourceLocations) - .forEach { (state, location) -> - state.cancelPendingLocation(location) - } + cleanUp() throw e } } From ff9ea0f66eaa92455c645a388797a81af545fd55 Mon Sep 17 00:00:00 2001 From: Quentin Gliosca Date: Tue, 10 Feb 2026 11:02:46 +0100 Subject: [PATCH 56/56] Small location-related fixes --- .../web/internals/webview/WebViewScrollController.kt | 2 +- .../navigator/web/reflowable/ReflowableWebPublication.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt index e9e6f2bfca..fab0da2be9 100644 --- a/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt +++ b/readium/navigators/web/internals/src/main/kotlin/org/readium/navigator/web/internals/webview/WebViewScrollController.kt @@ -203,7 +203,7 @@ private fun RelaxedWebView.scrollToProgression( scrollTo(ceil(progression * docWidth).roundToInt(), scrollY) } LayoutDirection.Rtl -> { - scrollTo((ceil(1 - progression) * docWidth).roundToInt(), scrollY) + scrollTo((ceil((1 - progression) * docWidth)).roundToInt(), scrollY) } } } diff --git a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt index 91c936f727..e01b29e580 100644 --- a/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt +++ b/readium/navigators/web/reflowable/src/main/kotlin/org/readium/navigator/web/reflowable/ReflowableWebPublication.kt @@ -68,10 +68,12 @@ internal class ReflowableWebPublication( fun positionForProgression(index: Int, progression: Progression): Position { val itemPositionNumber = readingOrder.positionNumbers[index] val localPosition = floor(progression.value * itemPositionNumber).toInt() + // If progression == 1.0, don't go for the next resource. + .coerceAtMost(itemPositionNumber - 1) return Position(startPositions[index] + localPosition)!! } fun totalProgressionForPosition(position: Position): Progression { - return Progression(position.value / totalPositionCount.toDouble())!! + return Progression((position.value - 1) / totalPositionCount.toDouble())!! } }